cecemei commented on code in PR #18782:
URL: https://github.com/apache/druid/pull/18782#discussion_r2569874792
##########
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:
minor nit: the `oldSegment.map` here seems a bit unnecessary, could be more
readable if use simple if `oldSegment.isPresent()`
##########
processing/src/test/java/org/apache/druid/segment/TestSegmentUtils.java:
##########
@@ -126,6 +126,12 @@ public List<OrderBy> getOrdering()
{
return Cursors.ascendingTimeOrder();
}
+
+ @Override
+ public int getNumRows()
+ {
+ return 1234;
+ }
Review Comment:
This seems unused?
--
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]