y1chi commented on a change in pull request #16769:
URL: https://github.com/apache/beam/pull/16769#discussion_r801207453
##########
File path:
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/data/BeamFnDataOutboundAggregator.java
##########
@@ -199,7 +210,14 @@ public void sendBufferedDataAndFinishOutboundStreams() {
.setIsLast(true);
entry.getValue().resetStats();
}
+ if (collectElementsIfNoFlushes && !hasFlushedForBundle) {
+ return bufferedElements.build();
+ }
outboundObserver.onNext(bufferedElements.build());
+ // This is now at the end of a bundle, so we reset hasFlushedForBundle to
prepare for new
+ // bundles.
+ hasFlushedForBundle = false;
Review comment:
the convertBufferForTransmission implicitly turns the flushThread to a
no-op thread, so there should only be only one thread accessing
hasFlushedForBundle.
--
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]