JayajP commented on code in PR #30913:
URL: https://github.com/apache/beam/pull/30913#discussion_r1567932972
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/RemoveSafeDeltaCounterCell.java:
##########
@@ -62,6 +62,12 @@ public void reset() {
@Override
public void inc(long n) {
+ AtomicLong val = countersMap.get(metricName);
Review Comment:
`computeIfAbsent` still does the locking.
I used it to simplify the code incase `countersMap.get(metricName)` returns
null.
--
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]