abhishekrb19 commented on code in PR #15589:
URL: https://github.com/apache/druid/pull/15589#discussion_r1429207344


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentAllocationQueue.java:
##########
@@ -439,6 +440,11 @@ private int allocateSegmentsForBatch(AllocateRequestBatch 
requestBatch, Set<Data
     final List<Granularity> candidateGranularities
         = 
Granularity.granularitiesFinerThan(requestBatch.key.preferredSegmentGranularity);
     for (Granularity granularity : candidateGranularities) {
+      // Do not try to allocate with WEEK granularity unless the preferred 
granularity itself is WEEK
+      if 
(!Granularities.WEEK.equals(requestBatch.key.preferredSegmentGranularity)

Review Comment:
   Please see my comment re moving this logic inside 
`Granularity.granularitiesFinerThan`. If we do that, we can skip this filtering 
logic at every call site and avoid bugs.



-- 
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]

Reply via email to