PabloPauling commented on code in PR #40721:
URL: https://github.com/apache/beam/pull/40721#discussion_r4346294891


##########
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java:
##########
@@ -546,6 +578,15 @@ public void close() throws Exception {
             exception.addSuppressed(e);
           }
         }
+        // After the response, so that a failed bundle reports the SDK's error 
rather than the
+        // cancelled queue it caused.
+        if (drainException != null) {

Review Comment:
    Good point, fixed in 5b2c223. The completion, checkpoint and finalization 
callbacks now only run when the output drain succeeded. A bundle whose drain 
failed reports neither residuals nor finalization (its state registration was 
already aborted). Covered by testFailedOutputDrainDoesNotReportCompletion. The 
original code also ran these callbacks before draining, so this tightens 
pre-existing behaviour too.



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