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

[improve][broker] Improve knownBrokers update in ModularLoadManagerImpl #20196

Merged
merged 2 commits into from Apr 28, 2023

Conversation

AnonHxy
Copy link
Contributor

@AnonHxy AnonHxy commented Apr 27, 2023

Motivation

Improve knowBrokers update

Modifications

Improve knowBrokers update

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: AnonHxy#37

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 27, 2023
@Technoboy- Technoboy- added this to the 3.1.0 milestone Apr 28, 2023
@Technoboy-
Copy link
Contributor

/pulsarbot rerun-failure-checks

@He-Pin
Copy link
Member

He-Pin commented Apr 28, 2023

knownBrokers?

@lifepuzzlefun
Copy link
Contributor

@AnonHxy hi i found some previous fix on the ConcurrentModificationException when on knownBrokers field.
and in my opinion this method will have a chance to execute concurrently.
So if thread1 is try to figure out which is newAddBroker and which is deadBroker. thread2 clear the Collection will there an missing update?maybe an synchronized is need WDYT?

@AnonHxy AnonHxy changed the title [improve][broker] Improve knowBrokers update [improve][broker] Improve knownBrokers update Apr 28, 2023
@AnonHxy
Copy link
Contributor Author

AnonHxy commented Apr 28, 2023

knownBrokers?

Great. Have corrected the title. Thanks

@AnonHxy AnonHxy changed the title [improve][broker] Improve knownBrokers update [improve][broker] Improve knownBrokers update in ModularLoadManagerImpl Apr 28, 2023
@AnonHxy
Copy link
Contributor Author

AnonHxy commented Apr 28, 2023

@AnonHxy hi i found some previous fix on the ConcurrentModificationException when on knownBrokers field. and in my opinion this method will have a chance to execute concurrently. So if thread1 is try to figure out which is newAddBroker and which is deadBroker. thread2 clear the Collection will there an missing update?maybe an synchronized is need WDYT?

Make sense

@nodece nodece merged commit a362eaa into apache:master Apr 28, 2023
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants