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

[release-3.5]: use RLock in Demoted method for read-only access to expiry #19445

Open
wants to merge 1 commit into
base: release-3.5
Choose a base branch
from

Conversation

1911860538
Copy link

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

@1911860538 1911860538 force-pushed the release35/server-lease branch from 8e0a08d to 5245f6f Compare February 18, 2025 11:25
@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2025

/ok-to-test

@serathius
Copy link
Member

serathius commented Feb 18, 2025

Please don't backport performance changes, etcd v3.6 is soon to be released. The argument that we need to backport to make it available should no longer be relevant. We should focus on releasing v3.6 and its adoption.

@1911860538
Copy link
Author

Please don't backport performance changes, etcd v3.6 is soon to be released. The argument that we need to backport to make it available should no longer be relevant. We should focus on releasing v3.6 and its adoption.

@ahrtr @serathius Acknowledged, I am going to close this pull request.

@1911860538 1911860538 closed this Feb 18, 2025
@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2025

Please don't backport performance changes, etcd v3.6 is soon to be released. The argument that we need to backport to make it available should no longer be relevant. We should focus on releasing v3.6 and its adoption.

This is not a performance fix but a correction of a misuse of sync.RWMutex, which is why backporting makes sense. That said, it’s not a critical issue, and I feel the concern here is somewhat overstated.

While 3.6 is the priority, that doesn’t mean we can’t make small, low-effort fixes along the way.

@ahrtr ahrtr reopened this Feb 18, 2025
@ahrtr ahrtr changed the title perf(release3.5): use RLock in Demoted method for read-only access to expiry [release-3.5]: use RLock in Demoted method for read-only access to expiry Feb 18, 2025
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.

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 1911860538, ahrtr, fuweid

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
Copy link
Member

This is not a performance fix but a correction of a misuse of sync.RWMutex, which is why backporting makes sense. That said, it’s not a critical issue, and I feel the concern here is somewhat overstated.

Switching from Lock to RLock, doesn't fix any concurrency issue, just improves performance.

@ahrtr
Copy link
Member

ahrtr commented Feb 19, 2025

This is not a performance fix but a correction of a misuse of sync.RWMutex, which is why backporting makes sense. That said, it’s not a critical issue, and I feel the concern here is somewhat overstated.

Switching from Lock to RLock, doesn't fix any concurrency issue, just improves performance.

It's unfortunate that we're spending time debating such a trivial fix.

@fuweid
Copy link
Member

fuweid commented Feb 19, 2025

This change is valid since RLock is read-only check. is there any concern for this change?

@ahrtr
Copy link
Member

ahrtr commented Feb 20, 2025

Let's do not waste more time on this. Let's see what other active maintainers/reviewers think. @ivanvc @jmhbnz

If majority approve, then just merge it; otherwise, just close it. Please respond on both #19443 and this PR. Thanks.

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