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:24:14 UTC
[GitHub] [beam] apilloud commented on a diff in pull request #24188: Handle CompleteWorkStatus shutdown signal
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org