-
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
Skip compaction for datasources with partial-eternity segments #15542
Skip compaction for datasources with partial-eternity segments #15542
Conversation
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.
Changes LGTM.
.../src/test/java/org/apache/druid/server/coordinator/compact/NewestSegmentFirstPolicyTest.java
Show resolved
Hide resolved
// This is to prevent the coordinator from crashing as raised in https://github.com/apache/druid/issues/13208 | ||
log.warn("Cannot compact datasource[%s] with ALL granularity", dataSource); | ||
log.warn("Cannot compact datasource[%s] containing segments with partial-ETERNITY intervals", dataSource); |
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.
While at it, could you add the segment id as well? It'd make it easy to take any action in the metadata store or via the console, if needed.
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.
There could be several segments and it could be noisy to log all of them
log.warn("Cannot compact datasource[%s] since interval is ETERNITY.", dataSourceName); | ||
if (Intervals.ETERNITY.getStart().equals(lookupInterval.getStart()) | ||
|| Intervals.ETERNITY.getEnd().equals(lookupInterval.getEnd())) { | ||
log.warn("Cannot compact datasource[%s] since interval start or end coincides with ETERNITY.", dataSourceName); |
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.
log.warn("Cannot compact datasource[%s] since interval start or end coincides with ETERNITY.", dataSourceName); | |
log.warn("Cannot compact datasource[%s] since lookupInterval[%s] coincides with ETERNITY.", dataSourceName, lookupInterval); |
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
This PR builds on #13304 to skip compaction for datasources with segments that have their interval start or end coinciding with Eternity interval end-points.
This is needed in order to prevent an issue similar to #13208 as the Coordinator tries to iterate over a large number of intervals when trying to compact an interval with infinite start or end.
This PR has: