m-trieu commented on code in PR #29082:
URL: https://github.com/apache/beam/pull/29082#discussion_r1367324066
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/ActiveWorkState.java:
##########
@@ -108,9 +132,19 @@ synchronized ActivateWorkResult
activateWorkForKey(ShardedKey shardedKey, Work w
}
// Ensure we don't already have this work token queued.
- for (Work queuedWork : workQueue) {
+ Iterator<Work> workQueueIterator = workQueue.iterator();
+ while (workQueueIterator.hasNext()) {
+ Work queuedWork = workQueueIterator.next();
if (queuedWork.getWorkItem().getWorkToken() ==
work.getWorkItem().getWorkToken()) {
- return ActivateWorkResult.DUPLICATE;
+ // Work is a duplicate.
+ if (queuedWork.getWorkItem().getCacheToken() ==
work.getWorkItem().getCacheToken()) {
Review Comment:
should we add the startTime to the WorkDedupeKey/WorkId then?
--
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]