maytasm commented on a change in pull request #12062:
URL: https://github.com/apache/druid/pull/12062#discussion_r770014121
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/duty/CompactSegments.java
##########
@@ -343,18 +346,49 @@ private CoordinatorStats doRun(
snapshotBuilder.incrementSegmentCountCompacted(segmentsToCompact.size());
final DataSourceCompactionConfig config =
compactionConfigs.get(dataSourceName);
+
// Create granularitySpec to send to compaction task
ClientCompactionTaskGranularitySpec granularitySpec;
- if (config.getGranularitySpec() != null) {
- granularitySpec = new ClientCompactionTaskGranularitySpec(
- config.getGranularitySpec().getSegmentGranularity(),
- config.getGranularitySpec().getQueryGranularity(),
- config.getGranularitySpec().isRollup()
-
- );
+ Granularity segmentGranularityToUse = null;
+ if (config.getGranularitySpec() == null ||
config.getGranularitySpec().getSegmentGranularity() == null) {
+ // Determines segmentGranularity from the segmentsToCompact
+ // Each batch of segmentToCompact from CompactionSegmentIterator
will contains a single time chunk
+ boolean allSegmentsOverlapped = true;
Review comment:
all segments have same interval -> no need to do union
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]