Skip invalidating segments for today if flag is provided #22546
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The
core:archive
command provides a flag--skip-segments-today
, which prevents segments data from being processed for today.The currently implementation only prevents them from being processed. But invalidation done for today before archiving is started is currently done anyway. This causes also the higher periods (week, month, year) to be invalidated. But as only today is prevented from being archived for segments, those higher periods will be reprocessed anyway, even if there actually were no changes in lower periods.
To prevent this unnecessary archiving of those higher periods, this PR changes the behavior of the initial invalidation. If
--skip-segments-today
is provided, we will no longer create invalidations for segments for today (and periods including this day).This shouldn't cause any problems even if the flag is used always when archiving is triggered, as
yesterday
will still be invalidated for segments.Review