gianm commented on code in PR #18782:
URL: https://github.com/apache/druid/pull/18782#discussion_r2572681155


##########
server/src/main/java/org/apache/druid/server/SegmentManager.java:
##########
@@ -380,11 +380,11 @@ public void dropSegment(final DataSegment dataSegment)
               try (final Closer closer = Closer.create()) {
                 final Optional<Segment> oldSegment = 
cacheManager.acquireCachedSegment(oldSegmentRef);
                 long numberOfRows = oldSegment.map(segment -> {
+                  closer.register(segment);

Review Comment:
   To me the structure seems reasonable, since for regular segments it is doing 
`return countInspector.getNumRows()` and the return val `numberOfRows` ends up 
going to the `dataSourceState.removeSegment` call.



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