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 strict synchronization for revision getter to minimize flaky result caused by time racing. #17513

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

Conversation

joshuazh-x
Copy link

@joshuazh-x joshuazh-x commented Mar 1, 2024

@k8s-ci-robot
Copy link

Hi @joshuazh-x. 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/test-infra repository.

@ahrtr
Copy link
Member

ahrtr commented Mar 1, 2024

/ok-to-test

…lt caused by time racing.

Signed-off-by: Joshua Zhang <joshuazh@microsoft.com>
@ahrtr
Copy link
Member

ahrtr commented Mar 25, 2024

@joshuazh-x could you rebase this PR?

Comment on lines +119 to +122
var timeoutC <-chan time.Time
if r.waitTimeout < math.MaxInt64 {
timeoutC = time.After(r.waitTimeout)
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggest to follow the pattern "A Timeout of zero means no timeout."

FYI.
https://github.com/golang/go/blob/c2c4a32f9e57ac9f7102deeba8273bcd2b205d3c/src/net/http/client.go#L96

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.

None yet

3 participants