-
Notifications
You must be signed in to change notification settings - Fork 3.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
datarace in LeaseManager exposed by TestReplicateQueueDownReplicate #28222
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
C-test-failure
Broken test (automatically or manually discovered).
Comments
andreimatei
added
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
C-test-failure
Broken test (automatically or manually discovered).
labels
Aug 2, 2018
Huh, this looks like a legit race that's been there basically since this code was first implemented. It's impressive it's made it nearly two years without being noticed. |
a-robinson
added a commit
to a-robinson/cockroach
that referenced
this issue
Aug 2, 2018
This race was exceptionally rare due to how the lease manager is typically used by the sqlmigrations package, but it is indeed a race. Holding a mutex while making a remote RPC is usually a terrible idea, but in the context of how it's used it's actually more dangerous to let ExtendLease and ReleaseLease interleave, since if ReleaseLease's CPut fails then the sqlmigrations package will log.Fatal, and the only potential for lock contention is between one goroutine using ExtendLease and one running ReleaseLseas. Perhaps this is tuning the package too tightly to the needs of its client, but as of now it's its only client. Fixes cockroachdb#28222 Release note: None
a-robinson
added a commit
to a-robinson/cockroach
that referenced
this issue
Aug 3, 2018
This race was exceptionally rare due to how the lease manager is typically used by the sqlmigrations package, but it is indeed a race. Holding a semaphore while making a remote RPC is usually a terrible idea, but in the context of how it's used it's actually more dangerous to let ExtendLease and ReleaseLease interleave, since if ReleaseLease's CPut fails then the sqlmigrations package will log.Fatal, and the only potential for lock contention is between one goroutine using ExtendLease and one running ReleaseLease. Perhaps this is tuning the package too tightly to the needs of its client, but as of now it's its only client. Fixes cockroachdb#28222 Release note: None
craig bot
pushed a commit
that referenced
this issue
Aug 3, 2018
28174: changefeedccl: test that the initial scan only emits the latest value r=nvanbenschoten a=danhhz Release note: None 28223: internal/client: Make the lease manager thread-safe r=a-robinson a=a-robinson This race was exceptionally rare due to how the lease manager is typically used by the sqlmigrations package, but it is indeed a race. Holding a mutex while making a remote RPC is usually a terrible idea, but in the context of how it's used it's actually more dangerous to let ExtendLease and ReleaseLease interleave, since if ReleaseLease's CPut fails then the sqlmigrations package will log.Fatal, and the only potential for lock contention is between one goroutine using ExtendLease and one running ReleaseLseas. Perhaps this is tuning the package too tightly to the needs of its client, but as of now it's its only client. Fixes #28222 Release note: None Co-authored-by: Daniel Harrison <[email protected]> Co-authored-by: Alex Robinson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
C-test-failure
Broken test (automatically or manually discovered).
Check out this test failure: #27783 (comment)
Failed test: https://teamcity.cockroachdb.com/viewLog.html?buildId=806649&tab=buildLog
The text was updated successfully, but these errors were encountered: