@tsteur opened this Pull Request on October 10th 2021 Member

Description:

While commenting on https://github.com/matomo-org/matomo/issues/17941 I noticed that a segment that is selected to be pre-processed would still be archived when it's viewed from browser even though it's set to be preprocessed. When a segment is selected to be pre-processed then it should be only processed during cron archiving no matter the if browser archiving for segments is available or not.

I'm meaning this setting:
image

When it's currently set to be pre-processed, it would be still archived during day time. Users confirm this makes Matomo slow!

The logic for whether archiving is enabled / disabled or not is currently where complicated IMO:

image

I'm thinking this new logic is more clear and less prone to side effects from when the shouldProcessReportsAllPlugins is shown.

image

Behaviour to be specified

There's also one other issue I noticed in the implementation. When setting archiving_range_force_on_browser_request=0 in config, then we were still archiving ranges in some cases. Like if browser archiving is enabled (as described in the config setting for it) or if the range is requested during CLI archiving. Not sure if that's on purpuse but I kept this logic.
image

Review

@tsteur commented on October 11th 2021 Member

The tests don't seem to fail because of this change. @mattab can you maybe also have a look at the logic and if that makes sense to you?

This Pull Request was closed on October 18th 2021
Powered by GitHub Issue Mirror