-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rollup config to auto and manual compaction #11850
Conversation
// Same indexSpec as what is set in the auto compaction config | ||
Map<String, Object> indexSpec = mapper.convertValue(new IndexSpec(), new TypeReference<Map<String, Object>>() {}); | ||
// Same partitionsSpec as what is set in the auto compaction config | ||
PartitionsSpec partitionsSpec = NewestSegmentFirstIterator.findPartitinosSpecFromConfig(ClientCompactionTaskQueryTuningConfig.from(null, null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, there is a typo in there findPartitinosSpecFromConfig
-> findPartitionsSpecFromConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// rollup=false for interval 2017-10-01T00:00:00/2017-10-02T00:00:00, | ||
// rollup=true for interval 2017-10-02T00:00:00/2017-10-03T00:00:00, | ||
// and rollup=null for interval 2017-10-03T00:00:00/2017-10-04T00:00:00 | ||
final VersionedIntervalTimeline<String, DataSegment> timeline = createTimeline( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a test that segments in the same compaction state with rollup are not re-compacted? or is that covered automatically by another test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should also cover that case. Here we have:
- segments with interval 2017-10-01T00:00:00/2017-10-02T00:00:00 and rollup=false in compaction state
- segments with interval 2017-10-02T00:00:00/2017-10-03T00:00:00 and rollup=true in compaction state
- segments with interval 2017-10-03T00:00:00/2017-10-04T00:00:00 and rollup=null in compaction state (this means that the last time this segment/interval was compacted, the rollup value was not set in the auto compaction config).
Then we set auto compaction config with rollup=true.
We then expect that the segments with interval 2017-10-02T00:00:00/2017-10-03T00:00:00 are not returned since rollup in last compaction state is same as auto compaction config
We expect segments with interval 2017-10-01T00:00:00/2017-10-02T00:00:00 and segments with interval 2017-10-03T00:00:00/2017-10-04T00:00:00 to be returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that what you are thinking or is it something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, oops 👍
Add rollup config to auto and manual compaction
Description
Add rollup to auto compaction and manual compaction.
This PR has: