seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

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

Open arjun12102019 opened this issue 1 year ago • 0 comments

Why do we require explicit thread safety using synchronized block for "metrics" map in "AbstractMetricsContext" class.

image

metrics is concurrentHashmap and which will take care of thread safety by default for "get" and "put" operations.

image

Please confirm about my understanding, So that I will make changes and raise PR.

arjun12102019 avatar Apr 30 '24 10:04 arjun12102019