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

Deep copy the tenants to avoid concurrent sort exception #11463

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

shoothzj
Copy link
Member

Motivation

Currently, the sort of tenants can be accessed from multi threads(pulsar-web jetty threads), which tenants are acquired from cache. So the concurrent sort of tenants could arise concurrent modification exception.

Modifications

Before the tenants sort, deep copy the list to avoid concurrent access.

Documentation

For this PR, we don't need to update docs, because changes not visible from api.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

Great catch

@shoothzj shoothzj force-pushed the master branch 6 times, most recently from 9fa2cb1 to 42cf146 Compare July 27, 2021 15:30
@codelipenghui codelipenghui added release/2.8.1 type/bug The PR fixed a bug or issue reported a bug labels Jul 27, 2021
@codelipenghui codelipenghui added this to the 2.9.0 milestone Jul 27, 2021
@shoothzj shoothzj force-pushed the master branch 2 times, most recently from 653ca2b to 34e13e9 Compare July 28, 2021 01:02
@Anonymitaet Anonymitaet added the doc-not-needed Your PR changes do not impact docs label Jul 28, 2021
@shoothzj shoothzj force-pushed the master branch 3 times, most recently from 9fc4dc7 to 5f0f519 Compare July 28, 2021 05:53
Copy link
Contributor

@315157973 315157973 left a comment

Choose a reason for hiding this comment

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

Nice catch

@shoothzj shoothzj force-pushed the master branch 5 times, most recently from f32f141 to 28cd485 Compare July 29, 2021 00:59
codelipenghui pushed a commit that referenced this pull request Jul 30, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 30, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants