-
Notifications
You must be signed in to change notification settings - Fork 556
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
fix: create new readers and writer for every sync request #10037
fix: create new readers and writer for every sync request #10037
Conversation
Test Results 811 files ± 0 811 suites ±0 1h 42m 17s ⏱️ - 1m 37s For more details on these failures, see this check. Results for commit caefea7. ± Comparison against base commit 7f1134c. ♻️ This comment has been updated with latest results. |
Due to our actor scheduler, even sync handlers can't reuse readers and writers because `onComplete` on the already completed future doesn't run immediately, causing a data race for concurrent requests.
fbf6f7d
to
fab336e
Compare
This indirection was more confusing than helpful. All handlers are effectively async, even if their `handleAsync` implementation could be sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
bors r+ |
10037: fix: create new readers and writer for every sync request r=oleschoenburg a=oleschoenburg ## Description Applies the fix in #10026 for sync api handlers too. Due to our actor scheduler, even sync handlers can't reuse readers andwriters because `onComplete` on the already completed future doesn't run immediately, causing a data race on the readers and writers when handling concurrent requests. ## Related issues <!-- Which issues are closed by this PR or are related --> closes #10014 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
Build failed: |
runner crashed bors r+ |
10037: fix: create new readers and writer for every sync request r=oleschoenburg a=oleschoenburg ## Description Applies the fix in #10026 for sync api handlers too. Due to our actor scheduler, even sync handlers can't reuse readers andwriters because `onComplete` on the already completed future doesn't run immediately, causing a data race on the readers and writers when handling concurrent requests. ## Related issues <!-- Which issues are closed by this PR or are related --> closes #10014 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
Build failed: |
Ugh, bors r+ |
Build succeeded: |
Description
Applies the fix in #10026 for sync api handlers too.
Due to our actor scheduler, even sync handlers can't reuse readers andwriters because
onComplete
on the already completed future doesn't run immediately, causing a data race on the readers and writers when handling concurrent requests.Related issues
closes #10014
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Please refer to our review guidelines.