-
Notifications
You must be signed in to change notification settings - Fork 3.9k
kvserver: do not cancel while in HandleRaftResponse #148965
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
kvserver: do not cancel while in HandleRaftResponse #148965
Conversation
Epic: none Release note: none
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
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.
LGTM, thank you for looking into this.
db8b50c
to
b965278
Compare
TFTR! bors r=tbg |
bors cancel |
Canceled. |
If the context is canceled in the middle of HandleRaftResponse, a Replica can be left in a broken state, e.g. its destruction can be partially completed. This can brick a RangeID, e.g. cause a subsequent call to getOrCreateReplica to be stuck in an infinite loop. Epic: none Release note: none
b965278
to
1f63750
Compare
bors r=tbg |
🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 4273ead to blathers/backport-release-23.2-148965: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-23.2 failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 4273ead to blathers/backport-release-24.1-148965: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-24.1 failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 4273ead to blathers/backport-release-24.3-148965: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-24.3 failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 4273ead to blathers/backport-release-25.1-148965: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-25.1 failed. See errors above. 💡 Consider backporting to the fork repo instead of the main repo. See instructions for more details. error creating merge commit from 4273ead to blathers/backport-release-25.2-148965: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-25.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Backporting this fix to |
If the context is canceled in the middle of
HandleRaftResponse
(afterprocessQueue
returns), aReplica
can be left in a broken state, e.g. its destruction can be partially completed. This can brick aRangeID
, e.g. cause a subsequent call togetOrCreateReplica
to be stuck in an infinite loop.This commit allows the
HandleRaftResponse
loop to terminate gracefully, by using a higher-level context which is not cancelable.Fixes #140958, #145030