Nagarjunanm commented on code in PR #20559:
URL: https://github.com/apache/druid/pull/20559#discussion_r4271335331


##########
extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitter.java:
##########
@@ -175,6 +184,19 @@ protected void logLostMessagesStatus()
         currentSegmentMetadataLost - 
previousSegmentMetadataLost.getAndSet(currentSegmentMetadataLost);
     long deltaInvalidLost = currentInvalidLost - 
previousInvalidLost.getAndSet(currentInvalidLost);
 
+    long currentMetricSampled = metricSampled.get();
+    long deltaMetricSampled = currentMetricSampled - 
previousMetricSampled.getAndSet(currentMetricSampled);
+
+    if (deltaMetricSampled > 0) {

Review Comment:
   Thanks for this finding. Fixed in bc54eb4: `previousMetricEmitted` now moves 
forward on every status check, and the summary is still only logged when the 
interval sampled something. Added 
`testSamplingSummaryWindowAdvancesWhenNothingSampled`, which fails without the 
fix.



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