loquisgon commented on code in PR #12392:
URL: https://github.com/apache/druid/pull/12392#discussion_r847813459


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:
##########
@@ -550,16 +552,18 @@ private String createIndexTaskSpecId(int i)
         segmentProvider,
         lockGranularityInUse
     );
+
     final Map<DataSegment, File> segmentFileMap = pair.lhs;
     final List<TimelineObjectHolder<String, DataSegment>> timelineSegments = 
pair.rhs;
 
     if (timelineSegments.size() == 0) {
       return Collections.emptyList();
     }
 
-    // find metadata for interval
+    // find metadata for intervals with real data segments
     // queryableIndexAndSegments is sorted by the interval of the dataSegment
-    final List<NonnullPair<QueryableIndex, DataSegment>> 
queryableIndexAndSegments = loadSegments(
+    // Note that this list will contain null QueriableIndex values for 
tombstones
+    final List<Pair<QueryableIndex, DataSegment>> queryableIndexAndSegments = 
loadSegments(

Review Comment:
   Yes, fully agree. The code should be adapted eventually so that it returns 
no-op queriable indices or something along those lines, this would also help 
simplifying the query path. For now, this change is beneficial since now it 
will limit the filtering in the ingestion side to just the compaction task. Let 
me look into the compaction task to see if I can further simplify that code.



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