-
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
Remove context from mvcc public interface #18678
Conversation
Signed-off-by: Marek Siarkowicz <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: serathius The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -304,72 +296,6 @@ func setup(t *testing.T, setup testSetup) (mvcc.KV, lease.Lessor) { | |||
return s, lessor | |||
} | |||
|
|||
func TestReadonlyTxnError(t *testing.T) { |
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.
Need to double check the original motivation for the test and if we need to rewrite it. Marking the PR as draft until then.
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.
Ok, I think that enough context removal. Based on #14149 this Test validates that Readonly TXN pass context and don't panic on it. This is the exact place where we want to allow canceling Read transactions as it's safe and a feature to allow clients abort requests.
At some point would be good to design how context should be handled in etcd codebase. Non-cancel-able metadata for apply loop that executes writes, that can also be cancel-able for Read request. Both paths meet in the transaction code layer. Would be nice to be able to statically validate at compilation time whether transaction is read only.
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 17 files with indirect coverage changes @@ Coverage Diff @@
## main #18678 +/- ##
==========================================
- Coverage 68.80% 68.75% -0.06%
==========================================
Files 420 420
Lines 35540 35544 +4
==========================================
- Hits 24455 24437 -18
- Misses 9666 9681 +15
- Partials 1419 1426 +7 Continue to review full report in Codecov by Sentry.
|
cc @ahrtr
#18667 (comment)