-
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
Reuse check put #16519
base: main
Are you sure you want to change the base?
Reuse check put #16519
Conversation
saw the tests just now |
c0ded4a
to
0cf9c2f
Compare
server/etcdserver/txn/txn.go
Outdated
leaseID = lease.LeaseID(prevKV.Lease) | ||
} else if leaseID != lease.NoLease { | ||
if l := lessor.Lookup(leaseID); l == nil { | ||
return nil, nil, 0, lease.ErrLeaseNotFound |
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.
The following logic shouldn't be part of checkPut
.
if req.IgnoreValue {
val = prevKV.Value
}
if req.IgnoreLease {
leaseID = lease.LeaseID(prevKV.Lease)
}
if !req.PrevKv {
return val, nil, leaseID, nil
}
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.
I can implement it that way, but it results in weird duplication of logic to check whether prevKV is needed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
Signed-off-by: Marek Siarkowicz <[email protected]>
0cf9c2f
to
c47203d
Compare
[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 |
@serathius: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 104 files with indirect coverage changes @@ Coverage Diff @@
## main #16519 +/- ##
==========================================
- Coverage 68.82% 64.55% -4.28%
==========================================
Files 420 420
Lines 35623 35623
==========================================
- Hits 24519 22996 -1523
- Misses 9675 11133 +1458
- Partials 1429 1494 +65 Continue to review full report in Codecov by Sentry.
|
cc @ahrtr @jmhbnz
Built on #16517