kfaraz commented on code in PR #18255:
URL: https://github.com/apache/druid/pull/18255#discussion_r2209211750
##########
server/src/test/java/org/apache/druid/server/ClientQuerySegmentWalkerTest.java:
##########
@@ -987,10 +986,11 @@ public void testMetricsWithMaxSubqueryRowsEnabled()
ImmutableList.of(new Object[]{Intervals.ETERNITY.getStartMillis(), 3L})
);
- List<Event> events = emitter.getEvents();
+ List<StubServiceEmitter.ServiceMetricEventSnapshot> events =
+ emitter.getMetricEvents(ClientQuerySegmentWalker.ROWS_COUNT_METRIC);
- for (Event event : events) {
- EventMap map = event.toMap();
+ for (StubServiceEmitter.ServiceMetricEventSnapshot event : events) {
Review Comment:
Took a look at this. Apparently the `userDims` can change if the builder is
reused for emitting another event.
But this is problematic anyway.
If the same event is to be emitted using (one or more) emitters, it is
possible that before we even get to emit the event (as emission is always
async), the dimensions of the event have changed.
I wonder if we should do this in a separate PR though as it is addressing a
specific race condition. Let me know what you think.
--
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]