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


##########
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:
   The reason I put null values is to leave the current code flow as is as most 
as possible to mitigate the possibility of introducing a bug if refactoring. 
That list is used sometimes to process the data segments and other times to 
process the queryableindex associated with the data segment. So now that list 
will also carry tombstones (thus nulls in the corresponding entry in the pair 
for a tombstone). Most of the time the clients of that list do not care whether 
the quaryable index is null or not; I filtered them out just  in the couple of 
places were code cares. 



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