You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/09/08 07:34:19 UTC

[GitHub] [druid] kfaraz commented on pull request #13034: prometheus-emitter supports sending metrics to pushgateway regularly …

kfaraz commented on PR #13034:
URL: https://github.com/apache/druid/pull/13034#issuecomment-1240339747

   The changes look good. I have some concerns about thread-safety though. The `Metrics` object or the map of `registeredMetrics` inside it is not thread-safe. Every invocation of `emit` updates the map of registered which is being read by `flush` on a different thread. So it's possible that the metric map gets updated by an `emit` event while a `flush` event is still reading from the map, thus sending a metric packet with inconsistent values.
   
   I am not sure it would be a good idea to block `emit` while `flush` is going on either.
   
   @599166320 , @FrankChen021 , what do 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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org