Skip to content

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Mar 12, 2024

Motivation

AdvertisedListenersMultiBrokerLeaderElectionTest is flaky. This change is to reduce issues and this change isn't harmful.
The thread leak detector reported leaked threads. The way this could help is that when the test fails, cleanup would happen properly and the test retry could pass with better chance.
There's no guarantee that this would eliminate the flakiness problem, but it's useful for cleanups related to test retries.

Modifications

  • shutdown executors immediately by calling .shutdownNow() instead of .shutdown()
  • ensure that all threads waiting on the phaser instance would terminate by calling .forceTermination() on the phaser instance (this could also be taken care by .shutdownNow().

Documentation

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

…st flakiness

- shutdown executors immediately
- ensure that all waiting threads terminate
@lhotari lhotari self-assigned this Mar 12, 2024
@lhotari lhotari requested a review from liangyepianzhou March 12, 2024 23:14
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 12, 2024
@lhotari lhotari requested a review from Technoboy- March 12, 2024 23:25
@Technoboy-
Copy link
Contributor

I'm not sure this fix could resolve the flakiness

@lhotari
Copy link
Member Author

lhotari commented Mar 13, 2024

I'm not sure this fix could resolve the flakiness

I'm not either. It is to reduce issues and this change isn't harmful.
The thread leak detector reported leaked threads. The way this could help is that when the test fails, cleanup would happen properly and the test retry could pass with better chance.

@lhotari lhotari requested review from asafm and heesung-sohn March 13, 2024 14:33
@lhotari lhotari merged commit 46c9ce9 into apache:master Mar 13, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
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.

3 participants