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


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/ActiveWorkState.java:
##########
@@ -147,16 +182,22 @@ private synchronized void removeCompletedWorkFromQueue(
                 () ->
                     new IllegalStateException(
                         String.format(
-                            "Active key %s without work, expected token %d",
-                            shardedKey, workToken)));
+                            "Active key %s without work, expected work_token 
%d, expected cache_token %d",
+                            shardedKey, workDedupeKey.workToken(), 
workDedupeKey.cacheToken())));
 
-    if (completedWork.getWorkItem().getWorkToken() != workToken) {
+    if (completedWork.getWorkItem().getWorkToken() != workDedupeKey.workToken()
+        || completedWork.isRetryOf(workDedupeKey)) {
       // Work may have been completed due to clearing of stuck commits.
       LOG.warn(
-          "Unable to complete due to token mismatch for key {} and token {}, 
actual token was {}.",
+          "Unable to complete due to token mismatch for "
+              + "key {}, work_token {}, and cache_token {}; "
+              + "actual work_token was {},"
+              + "actual cache_token was {}.",
           shardedKey,
-          workToken,
-          completedWork.getWorkItem().getWorkToken());
+          workDedupeKey.workToken(),

Review Comment:
   done auto value has the out of the box so just printing the object



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