apilloud commented on code in PR #24188:
URL: https://github.com/apache/beam/pull/24188#discussion_r1025796697


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WorkItemStatusClient.java:
##########
@@ -116,6 +117,10 @@ public synchronized void setWorker(
   /** Return the {@link WorkItemServiceState} resulting from sending an error 
completion status. */
   public synchronized WorkItemServiceState reportError(Throwable e) throws 
IOException {
     checkState(!finalStateSent, "cannot reportUpdates after sending a final 
state");
+    if (wasAskedToAbort) {
+      LOG.info("Service already asked to abort work item, not reporting 
ignored progress.");
+      return null;

Review Comment:
   Added.
   
   This method has a `return execute(status)` and `execute` returns `@Nullable 
WorkItemServiceState`. There are also tests that return null, which I 
discovered with a previous variant of this PR that didn't handle that case. Any 
Java Object can be null.



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