Abacn commented on code in PR #29979:
URL: https://github.com/apache/beam/pull/29979#discussion_r1450923209
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/DataflowExecutionStateSampler.java:
##########
@@ -117,7 +117,8 @@ public Optional<ActiveMessageMetadata>
getActiveMessageMetadataForWorkId(String
return Optional.ofNullable(null);
}
- public Map<String, IntSummaryStatistics>
getProcessingDistributionsForWorkId(String workId) {
+ public synchronized Map<String, IntSummaryStatistics>
getProcessingDistributionsForWorkId(
+ String workId) {
if (!activeTrackersByWorkId.containsKey(workId)) {
Review Comment:
```suggestion
// synchronized to avoid race condition of accessing
activeTrackersByWorkId
if (!activeTrackersByWorkId.containsKey(workId)) {
```
--
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]