[Java Dataflow Streaming] Add support to AbstractWindmillStream to transition between physical streams within the same logical stream#35523
Conversation
…cal streams within the same logical stream
|
Sending out for some comments since I'm going to be OOO for a little bit. I still need to add a lot of tests but the simple functionality test for GetDataStream passes. |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
...ain/java/org/apache/beam/runners/dataflow/worker/windmill/client/AbstractWindmillStream.java
Outdated
Show resolved
Hide resolved
| // XXX figure out | ||
| } | ||
| try { | ||
| @NonNull PhysicalStreamHandler streamHandler = newResponseHandler(); |
There was a problem hiding this comment.
can we call startStream() here instead?
There was a problem hiding this comment.
I didn't want to do it in the synchronized block. we also want to do it after the handling of the error in case that will trigger new messages to be sent on the new stream.
| clearPhysicalStreamForDebug(); | ||
| currentPhysicalStream = null; | ||
| if (halfCloseFuture != null) { | ||
| halfCloseFuture.cancel(false); | ||
| halfCloseFuture = null; |
There was a problem hiding this comment.
these steps are repeated in a few places, consider moving them to a function like clearPhysicalStream()
|
R: @arunpandianp If you could take another look that would be great. I have finished with the GrpcGetDataStream tests. I would like to add more tests for the CommitStream still |
|
ack, will take a look |
|
Thanks! I finished the commitstream tests but see now there are failures in some of the existing tests and am investigating. |
|
/gemini summary |
Summary of ChangesThis pull request significantly enhances the robustness of Dataflow streaming by introducing support for dynamic physical stream transitions within a logical stream. This change allows the system to gracefully manage underlying GRPC connections, proactively cycle streams, and automatically recover from transient failures by re-flushing pending requests onto new connections, thereby improving the overall reliability and stability of long-running streaming jobs. Highlights
Changelog
Activity
|
|
just a few minor comments, the logic looks good to me |
d25bfb7 to
008f703
Compare
008f703 to
1f1139b
Compare
...ain/java/org/apache/beam/runners/dataflow/worker/windmill/client/AbstractWindmillStream.java
Outdated
Show resolved
Hide resolved
...a/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcCommitWorkStreamTest.java
Show resolved
Hide resolved
...a/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcCommitWorkStreamTest.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcGetDataStream.java
Outdated
Show resolved
Hide resolved
b6b149f to
b9a298f
Compare
|
failure is unrelated |
…ansition between physical streams within the same logical stream (apache#35523) * fix stuck get data if no current stream * improve html
…ansition between physical streams within the same logical stream (apache#35523) * fix stuck get data if no current stream * improve html
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.