m-trieu commented on code in PR #29082:
URL: https://github.com/apache/beam/pull/29082#discussion_r1487322939


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/ActiveWorkState.java:
##########
@@ -129,13 +135,29 @@ synchronized ActivateWorkResult 
activateWorkForKey(ShardedKey shardedKey, Work w
       return ActivateWorkResult.EXECUTE;
     }
 
-    // Ensure we don't already have this work token queued.
+    // Check to see if we have this work token queued.
+    // This set is for adding remove-able WorkItems if they exist in the 
workQueue. We add them to
+    // this set since a ConcurrentModificationException will be thrown if we 
modify the workQueue
+    // and then resume iteration.
+    Set<WorkId> queuedWorkToRemove = new HashSet<>();

Review Comment:
   done



-- 
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]

Reply via email to