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

Add a read lock when traversing batchDeletedIndexes #10763

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

315157973
Copy link
Contributor

Motivation

We will add a write lock when writing batchDeletedIndexes.
The traversal read operation is not atomic, and read lock need to be added

Modifications

add read lock in buildBatchEntryDeletionIndexInfoList

Verifying this change

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@315157973 315157973 self-assigned this Jun 1, 2021
@codelipenghui codelipenghui added this to the 2.8.0 milestone Jun 1, 2021
@codelipenghui codelipenghui merged commit 76d3426 into apache:master Jun 1, 2021
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
### Motivation
We will add a write lock when writing batchDeletedIndexes.
The traversal read operation is not atomic, and read lock need to be added

### Modifications
add read lock in  `buildBatchEntryDeletionIndexInfoList`
@315157973 315157973 deleted the thread-safe branch July 19, 2021 11:11
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### Motivation
We will add a write lock when writing batchDeletedIndexes.
The traversal read operation is not atomic, and read lock need to be added

### Modifications
add read lock in  `buildBatchEntryDeletionIndexInfoList`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants