-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
engine: fix race when reading fields in Concatenate #14324
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Vicent Marti <[email protected]>
vmg
requested review from
harshit-gangal,
systay,
frouioui and
GuptaManan100
as code owners
October 20, 2023 16:16
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Oct 20, 2023
@vmg Looks like we have a test timeout here?
Is it hanging indefinitely? |
Signed-off-by: Dirkjan Bussink <[email protected]>
dbussink
added
Type: Bug
Component: Query Serving
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
labels
Oct 23, 2023
dbussink
approved these changes
Oct 23, 2023
systay
approved these changes
Oct 23, 2023
systay
force-pushed
the
vmg/engine-concat
branch
from
October 23, 2023 08:57
aaa6d32
to
c77b904
Compare
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There's a race on this recently refactored code: you cannot use an atomic for counting which fields are set because that is inherently racy between setting the field and increasing the atomic. Using a simple Mutex and a counter is not enough either, because the same Result index may receive fields more than once, leaving a
nil
gap in the set of results whose types we must aggregate. One possible correct approach is using a mutex and checking all the parallel results until none of them arenil
. This is implemented here.The race was making
TestSQLSelectLimit
flaky.cc @systay @dbussink
Related Issue(s)
Broken in #14245
Checklist
Deployment Notes