-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
sql: deflake and unskip TestTenantStatementTimeoutAdmissionQueueCancelation #99876
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a data race.
Reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @cucaroach)
-- commits
line 3 at r1:
nit: can you add some words for what the problem was and how it's fixed now?
83ce72c
to
a54adc2
Compare
I couldn't reproduce the race, the test ran 100,000 w/o hanging though. I think I understand and fixed the race but its a bit of a guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach)
pkg/sql/run_control_test.go
line 962 at r2 (raw file):
// till we get one into the KV layer. for atomic.LoadUint64(&hitMainQuery) == 0 { _, err := client.DB.ExecContext(context.Background(), `SELECT * FROM foo`)
nit: can / should we check err
here? IIUC we should be getting err == nil
while hitMainQuery == 0
. We could check that non-nil error is only seen once or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)
pkg/sql/run_control_test.go
line 962 at r2 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
nit: can / should we check
err
here? IIUC we should be gettingerr == nil
whilehitMainQuery == 0
. We could check that non-nil error is only seen once or something like that.
Actually it errors every time with a timeout error, my flaw was in thinking the 500ms was enough time to guarantee it would get parked in the admission control queue and get cancelled there but every once in a blue moon it doesn't get that far and gets cancelled sooner. I'll make it clear and add a require.Error().
a54adc2
to
6c7a5be
Compare
6c7a5be
to
61371c2
Compare
…lation Make sure we get 4 blockers parked in the admission control queues and no more and retry the main query until it gets parked and booted from it, before we expected the main query to always reach the admission control q but that isn't reliable. Fixes: cockroachdb#78494
61371c2
to
5bf7940
Compare
bors r+ |
Build succeeded: |
blathers backport 23.1 22.2 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 5bf7940 to blathers/backport-release-22.2-99876: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Make sure we get 4 blockers parked in the admission control queues and no more and retry the
main query until it gets parked and booted from it, before we expected the main query to always
reach the admission control q but that isn't reliable.
Fixes: #78494