Skip to content
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 (backport #33220) #33267

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 20, 2023

This is an automatic backport of pull request #33220 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…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
Copy link
Collaborator

[FE Incremental Coverage Report]

😍 pass : 0 / 0 (0%)

@wanpengfei-git
Copy link
Collaborator

[BE Incremental Coverage Report]

😍 pass : 4 / 4 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/storage/persistent_index.cpp 4 4 100.00% []

@wanpengfei-git wanpengfei-git merged commit f29fab6 into branch-3.0 Oct 20, 2023
22 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.0/pr-33220 branch October 20, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants