You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/17 22:08:17 UTC

[GitHub] [beam] kennknowles commented on a diff in pull request #24188: Handle CompleteWorkStatus shutdown signal

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


##########
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:
   Add `@Nullable` to the return type. Are you sure it is safe? I don't see other nulls returned. I guess checking is turned off for this class...



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org