FrankChen021 commented on code in PR #19624:
URL: https://github.com/apache/druid/pull/19624#discussion_r3474273574
##########
server/src/main/java/org/apache/druid/segment/realtime/appenderator/SinkQuerySegmentWalker.java:
##########
@@ -354,6 +354,8 @@ public <T> QueryRunner<T> getQueryRunnerForSegments(final
Query<T> query, final
);
}
+ final int localSegmentCount = allSegmentReferences.size();
Review Comment:
[P2] Count realtime sinks instead of hydrants
This counts `allSegmentReferences`, but those references are hydrant-level:
`Sink.acquireSegmentReferences` adds one `SinkSegmentReference` per
`FireHydrant`. After a realtime segment has multiple hydrants, for example
after persist/swap or with both persisted and current hydrants, a query over
one Druid segment emits `query/segment/count` as the hydrant count instead of
the segment/Sink count. That disagrees with the metric's documented
segment-level meaning and with the existing per-segment metrics that aggregate
by `sinkSegmentId`; please count distinct queried sinks/descriptors and add a
multi-hydrant test.
--
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]