arunpandianp commented on code in PR #38814:
URL: https://github.com/apache/beam/pull/38814#discussion_r3376634201


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/Work.java:
##########
@@ -79,6 +82,8 @@ public final class Work implements RefreshableWork {
   private volatile TimedState currentState;
   private volatile boolean isFailed;
   private volatile String processingThreadName = "";
+  private final AtomicReference<@Nullable AtomicBoolean> onFailureListener =

Review Comment:
   > when we construct the work if we know what group
   
   Work is constructed before it is put into ActiveWorkState. Work can get 
cancelled when it is queued in ActiveWorkState. So we need a failure boolean 
even when it is not part of a batch. I think it makes it easy to reason about 
when they are separate, one controls the work level failure and the other 
controls the batch failure. 
   
   When a work is failed, we fail the batch but not the other work items in the 
same batch. The valid subset will get retried after the batch failure. So we 
cannot use the same boolean to represent both failures.



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