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
[BugFix] Fix pindex read-write concurrency between commit and apply #33220
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: zhangqiang <qiangzh95@gmail.com>
[FE Incremental Coverage Report]😍 pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]😍 pass : 5 / 5 (100.00%) file detail
|
chaoyli
approved these changes
Oct 20, 2023
decster
approved these changes
Oct 20, 2023
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.1 |
@Mergifyio backport branch-3.0 |
✅ Backports have been created
|
@Mergifyio backport branch-2.5 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
This was referenced Oct 20, 2023
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 20, 2023
…33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
mofeiatwork
pushed a commit
to mofeiatwork/starrocks
that referenced
this pull request
Oct 23, 2023
…tarRocks#33220) During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index. And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec. So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add _lock to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed. Signed-off-by: zhangqiang <qiangzh95@gmail.com> (cherry picked from commit 6bf3e88)
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.
During the execution of apply on the primary key table, the apply thread maybe clear or modify _l1_vec of persistent index.
And during the execution commit, the commit thread will update primary index memory usage and need to access _l1_vec.
So there are read/write conflicts between apply thread and commit thread which may cause BE crash. And we add
_lock
to prevent the read-write concurrency in previous pr but there are some scenarios where locks were inadvertently missed.What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: