You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/11/03 18:31:17 UTC
[GitHub] [druid] gianm commented on a diff in pull request #13304: Skip ALL to finer granularity compaction
gianm commented on code in PR #13304:
URL: https://github.com/apache/druid/pull/13304#discussion_r1013269973
##########
server/src/main/java/org/apache/druid/server/coordinator/duty/NewestSegmentFirstIterator.java:
##########
@@ -129,6 +131,12 @@ public class NewestSegmentFirstIterator implements CompactionSegmentIterator
// For example, if the original is interval of 2020-01-28/2020-02-03 with WEEK granularity
// and the configuredSegmentGranularity is MONTH, the segment will be split to two segments
// of 2020-01/2020-02 and 2020-02/2020-03.
+ if (Intervals.ETERNITY.equals(segment.getInterval())
+ && !Granularities.ALL.equals(configuredSegmentGranularity)) {
+ log.warn("Cannot compact segments from ALL to finer granularity for datasource[%s]", dataSource);
+ allToFinerGranularityCompaction = true;
+ continue;
Review Comment:
Early return directly from here?
##########
server/src/main/java/org/apache/druid/server/coordinator/duty/NewestSegmentFirstIterator.java:
##########
@@ -129,6 +131,12 @@ public class NewestSegmentFirstIterator implements CompactionSegmentIterator
// For example, if the original is interval of 2020-01-28/2020-02-03 with WEEK granularity
// and the configuredSegmentGranularity is MONTH, the segment will be split to two segments
// of 2020-01/2020-02 and 2020-02/2020-03.
+ if (Intervals.ETERNITY.equals(segment.getInterval())
+ && !Granularities.ALL.equals(configuredSegmentGranularity)) {
+ log.warn("Cannot compact segments from ALL to finer granularity for datasource[%s]", dataSource);
Review Comment:
Please include a link to this PR, so future devs can understand why we can't do this. One day, hopefully someone will fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org