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

Use RLock in Demoted method for read-only access to expiry #19432

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

1911860538
Copy link

Use RLock in Demoted method to improve read-only access to expiry with better concurrency.

@k8s-ci-robot
Copy link

Hi @1911860538. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@ahrtr
Copy link
Member

ahrtr commented Feb 17, 2025

/ok-to-test

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.80%. Comparing base (eb7607b) to head (e10f01e).
Report is 2 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
server/lease/lease.go 96.22% <100.00%> (-3.78%) ⬇️

... and 15 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19432      +/-   ##
==========================================
- Coverage   68.89%   68.80%   -0.09%     
==========================================
  Files         420      420              
  Lines       35753    35753              
==========================================
- Hits        24632    24601      -31     
- Misses       9698     9717      +19     
- Partials     1423     1435      +12     

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 eb7607b...e10f01e. Read the comment docs.

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for the catch.

@1911860538
Copy link
Author

LGTM

Thanks for the catch.

My pleasure.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 1911860538, ahrtr, 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

@serathius serathius merged commit 1e3710a into etcd-io:main Feb 18, 2025
41 checks passed
@1911860538 1911860538 deleted the feat/server-lease branch February 18, 2025 08:49
@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2025

/cherry-pick release-3.6

@k8s-infra-cherrypick-robot

@ahrtr: new pull request created: #19443

In response to this:

/cherry-pick release-3.6

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.

@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2025

/cherry-pick release-3.5

@k8s-infra-cherrypick-robot

@ahrtr: #19432 failed to apply on top of branch "release-3.5":

Applying: perf: use RLock in Demoted method for read-only access to expiry
Using index info to reconstruct a base tree...
A	server/lease/lease.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): server/lease/lease.go deleted in HEAD and modified in perf: use RLock in Demoted method for read-only access to expiry. Version perf: use RLock in Demoted method for read-only access to expiry of server/lease/lease.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 perf: use RLock in Demoted method for read-only access to expiry

In response to this:

/cherry-pick release-3.5

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.

@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2025

@1911860538 could you please backport this minor fix to 3.5 as well?

@1911860538
Copy link
Author

@1911860538 could you please backport this minor fix to 3.5 as well?

ok

@1911860538
Copy link
Author

@1911860538 could you please backport this minor fix to 3.5 as well?

#19445
I have created a new pull request.

@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2025

@1911860538 could you please backport this minor fix to 3.5 as well?

#19445 I have created a new pull request.

Thank you!

@ahrtr ahrtr changed the title perf: use RLock in Demoted method for read-only access to expiry Use RLock in Demoted method for read-only access to expiry Feb 18, 2025
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.

5 participants