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] Close TopicPoliciesService to allow Pulsar broker graceful shutdown #22589

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Apr 25, 2024

Motivation

There doesn't seem to be a proper handling for TopicPoliciesService shutdown.
This would be needed to allow the Pulsar broker to shutdown gracefully.
This also prevents memory leaks in tests. This problem was detected during the investigation of test OOMEs.
See #22588 for details.

Modifications

  • Add close method to TopicPoliciesService and implement it
  • Prevent creating new cached writers or readers after the service has been closed
  • Use Pulsar's executor for the AsyncLoader in TopicPoliciesService
  • make shutdown synchronous
  • Improve the close method of SystemTopicTxnBufferSnapshotService

Documentation

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

…raceful shutdown

- also prevents memory leaks in tests
@lhotari lhotari added this to the 3.3.0 milestone Apr 25, 2024
@lhotari lhotari requested a review from Technoboy- April 25, 2024 20:15
@lhotari lhotari self-assigned this Apr 25, 2024
@lhotari lhotari requested a review from heesung-sn April 25, 2024 20:15
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 25, 2024
@lhotari lhotari merged commit 7a44c80 into apache:master Apr 26, 2024
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test type/flaky-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants