Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Reuse check put #16519

wants to merge 1 commit into from

Conversation

serathius
Copy link
Member

cc @ahrtr @jmhbnz
Built on #16517

@iraj720
Copy link

iraj720 commented Sep 1, 2023

saw the tests just now
they are pointing to the same issue

@serathius serathius force-pushed the reuse-check-put branch 2 times, most recently from c0ded4a to 0cf9c2f Compare September 2, 2023 17:17
leaseID = lease.LeaseID(prevKV.Lease)
} else if leaseID != lease.NoLease {
if l := lessor.Lookup(leaseID); l == nil {
return nil, nil, 0, lease.ErrLeaseNotFound
Copy link
Member

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
	}

Copy link
Member Author

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.

Copy link

stale bot commented Mar 17, 2024

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.

@stale stale bot added the stale label Mar 17, 2024
Signed-off-by: Marek Siarkowicz <[email protected]>
@k8s-ci-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link

@serathius: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-etcd-verify c47203d link true /test pull-etcd-verify
pull-etcd-unit-test-386 c47203d link true /test pull-etcd-unit-test-386
pull-etcd-integration-1-cpu-arm64 c47203d link true /test pull-etcd-integration-1-cpu-arm64
pull-etcd-unit-test-amd64 c47203d link true /test pull-etcd-unit-test-amd64
pull-etcd-integration-4-cpu-amd64 c47203d link true /test pull-etcd-integration-4-cpu-amd64
pull-etcd-unit-test-arm64 c47203d link true /test pull-etcd-unit-test-arm64
pull-etcd-integration-2-cpu-amd64 c47203d link true /test pull-etcd-integration-2-cpu-amd64
pull-etcd-integration-2-cpu-arm64 c47203d link true /test pull-etcd-integration-2-cpu-arm64
pull-etcd-integration-4-cpu-arm64 c47203d link true /test pull-etcd-integration-4-cpu-arm64
pull-etcd-integration-1-cpu-amd64 c47203d link true /test pull-etcd-integration-1-cpu-amd64

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.

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 77.50000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 64.55%. Comparing base (7bb5596) to head (c47203d).

Files with missing lines Patch % Lines
server/etcdserver/txn/txn.go 77.50% 4 Missing and 5 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
server/etcdserver/txn/txn.go 84.07% <77.50%> (-9.08%) ⬇️

... 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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bb5596...c47203d. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants