-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Don't try to serialize half-baked cluster info #132756
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
40215fb
Don't try to serialize half-baked cluster info
smalyshev 8e86e1f
Merge branch 'main' into cluster-info-init
smalyshev a12c9d7
Merge branch 'main' into cluster-info-init
smalyshev 9ef4173
Use shorter uninitialized period to not break tests
smalyshev ce4aad6
Merge branch 'main' into cluster-info-init
smalyshev 1100c84
better wording
smalyshev 84c663e
Merge branch 'main' into cluster-info-init
smalyshev 98f0f66
Fix merge
smalyshev 5fc20e9
Merge branch 'main' into cluster-info-init
smalyshev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
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.
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.
I believe it could protect from concurrent addition while serializing, however I am not following what could trigger that.
This completes synchronously before any of the listeners in
analyzedPlancould fail. Am I missing something?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.
The problem can happen when we're running an async query, and the query runner has just started to construct the executionInfo here, and we get an async GET request at the same time. That request will also use executionInfo, but when serializing it
writeCollectionhas a race condition - it reads size first and then serializes elements. So we get broken serialization data as the result.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.
I see. Since it is just starting, it does not contain any meaningful information worth waiting for?
Uh oh!
There was an error while loading. Please reload this page.
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.
Precisely. We don't want to actually show anybody half-initialized cluster info, even if it didn't cause the race. And since we didn't initialize it yet, it can't contain anything important.