-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Handle read-only write txn failures gracefully #18803
Conversation
Signed-off-by: Shyam Jeedigunta <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shyamjvs The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @shyamjvs. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files
... and 33 files with indirect coverage changes @@ Coverage Diff @@
## main #18803 +/- ##
=======================================
Coverage 68.70% 68.70%
=======================================
Files 420 420
Lines 35512 35517 +5
=======================================
+ Hits 24399 24403 +4
- Misses 9677 9678 +1
Partials 1436 1436 Continue to review full report in Codecov by Sentry.
|
Don't like the change and don't think it is correct. My high level understanding of the motivation for
I don't see any benefits of what you are proposing, and I'm against about making What I can recommend is replacing |
I understand the motivation of this PR to remove unnecessary panic when the execution branch/path is readonly, but obviously it complicates the TXN applying workflow and without big benefit. So I suggest that we don't change it unless there is a strong justification.
That's the original only use case. The #14149 also removed the unnecessary panic in applying workflow; which I think is also valid use case, although it introduced a potential issues as @shyamjvs pointed out and fixed in #18749 |
Thanks for those comments @serathius @ahrtr. Few clarifications:
|
Suggest to close it. Readability & understandability is more important in the critical applying workflow, so let's keep it as simple as possible. |
Ack - will let @serathius also chime in with any final thoughts before closing. |
+1 to that.
We are especially careful about small changes. I don't think there is a tradeoff as we are just sacrificing readability to solve a problem that no one reported. I would like to see some evidence of this being a problem. |
Closing... @shyamjvs Please feel free to reach out if you still have any concern or comment. Thank you! |
Sounds good, thanks for discussing! |
Following up from #18667 (comment).
The idea is simple:
This change improves the behavior for 3 by avoiding an unnecessary panic when such read-only txns see an error - instead return the error back to server handler and move on with applying subsequent entries. Panic + server restart seems unnecessary overhead in such cases. This also paves a way to bring back context-based timeouts for such txns. One case where that could help is during high write contention scenarios where CAS operations often end up going to "failure" block and triggers a (potentially slow) range request.
/cc @serathius @ahrtr