lukecwik commented on a change in pull request #16051:
URL: https://github.com/apache/beam/pull/16051#discussion_r755405431
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
##########
@@ -458,7 +458,10 @@ public BundleFinalizer getBundleFinalizer() {
startFunction.run();
}
- if
(!bundleProcessor.getInboundEndpointApiServiceDescriptors().isEmpty()) {
+ if (request.getProcessBundle().hasElements()) {
+
bundleProcessor.getInboundObserver().accept(request.getProcessBundle().getElements());
+ bundleProcessor.getInboundObserver().awaitCompletion();
Review comment:
This will block forever if the elements message is malformed and doesn't
contain "terminal" elements so it would be better to handle this case
explicitly within the BeamFnDataInboundObserver2 as a separate method.
Also passing it through the queue within BeamFnDataInboundObserver2 and
adding the additional synchronization seems wasteful.
--
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]