Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine onMessage and onHalfClose callbacks into single call to avoid race condition #75

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

tillrohrmann
Copy link
Contributor

This commit introduces the RestateServerCallListener interface that combines the ServerCall.Listener#onMessage and #onHalfClose calls into a single call so that we solve the race condition caused by the RestateServerCall that called these two methods separately.

This fixes #74.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2023

Unit Test Results

100 tests  ±0   100 ✔️ ±0   7s ⏱️ -1s
  13 suites ±0       0 💤 ±0 
  13 files   ±0       0 ±0 

Results for commit 2ac7894. ± Comparison against base commit ac7be07.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this one!

@tillrohrmann
Copy link
Contributor Author

Thanks for the review @slinkydeveloper. Merging this PR now.

… race condition

This commit introduces the RestateServerCallListener interface that combines the
ServerCall.Listener#onMessage and #onHalfClose calls into a single call so that
we solve the race condition caused by the RestateServerCall that called these
two methods separately.

This fixes #74.
@tillrohrmann tillrohrmann merged commit 2ac7894 into restatedev:main Mar 16, 2023
@tillrohrmann tillrohrmann deleted the issue#74 branch March 16, 2023 09:26
slinkydeveloper added a commit that referenced this pull request Mar 18, 2024
…4378d55

4378d55 Move headers into InputStreamEntry. (#75)
433d446 Remove the old discovery. Fix #71

git-subtree-dir: sdk-core/src/main/service-protocol
git-subtree-split: 4378d559db7a53a477dd091b636a64712b2b630e
slinkydeveloper added a commit that referenced this pull request Mar 18, 2024
…4378d55

4378d55 Move headers into InputStreamEntry. (#75)
433d446 Remove the old discovery. Fix #71

git-subtree-dir: sdk-core/src/main/service-protocol
git-subtree-split: 4378d559db7a53a477dd091b636a64712b2b630e
slinkydeveloper added a commit that referenced this pull request Mar 20, 2024
…4378d55

4378d55 Move headers into InputStreamEntry. (#75)
433d446 Remove the old discovery. Fix #71

git-subtree-dir: sdk-core/src/main/service-protocol
git-subtree-split: 4378d559db7a53a477dd091b636a64712b2b630e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in blocking mode when polling the input
2 participants