You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "arjun12102019 (via GitHub)" <gi...@apache.org> on 2024/04/30 10:01:56 UTC

[I] Does synchronized block required for method "addMetric(String name, Metric metric)" in "AbstractMetricsContext" class? [seatunnel]

arjun12102019 opened a new issue, #6782:
URL: https://github.com/apache/seatunnel/issues/6782

   Why do we require explicit thread safety using synchronized block for "metrics" map  in "AbstractMetricsContext" class.
   
   ![image](https://github.com/apache/seatunnel/assets/166740820/4f7cc3a9-c588-4b92-aefa-d21b4ee51f8f)
   
   metrics is concurrentHashmap and which will take care of thread safety by default for "get" and "put" operations.
   
   ![image](https://github.com/apache/seatunnel/assets/166740820/37a27d5c-79bc-4e3b-9c8c-46c708d7b364)
   
   Please confirm about my understanding, So that I will make changes and raise PR.


-- 
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@seatunnel.apache.org.apache.org

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