FrankChen021 commented on code in PR #19648:
URL: https://github.com/apache/druid/pull/19648#discussion_r3520193693


##########
server/src/main/java/org/apache/druid/client/CachingClusteredClient.java:
##########
@@ -345,6 +345,20 @@ ClusterQueryResult<T> run(
       }
 
       final Set<SegmentServerSelector> segmentServers = 
computeSegmentsToQuery(timeline, specificSegments);
+      if (query.context().isDebug()) {
+        final String dataSource = ev.getBaseTableDataSource().getName();
+        log.infoSegmentIds(
+            segmentServers.stream().map(
+                s -> SegmentId.of(
+                    dataSource,
+                    s.getSegmentDescriptor().getInterval(),

Review Comment:
   [P2] Log real segment IDs, not query slices
   
   The debug log rebuilds a `SegmentId` from `SegmentDescriptor.getInterval()`, 
but `computeSegmentsToQuery` fills that descriptor from 
`TimelineObjectHolder.getInterval()`. `VersionedIntervalTimeline.lookup` trims 
the first or last holder to the requested interval, so a query over one day 
inside a week-long segment logs a synthetic segment id that never existed. Use 
`s.getServer().getSegment().getId()` for the segment id, and log the query 
interval separately if needed.



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