[fix][broker] Forward topic policy updates after init failures - #26110
Merged
lhotari merged 1 commit intoJun 29, 2026
Merged
Conversation
lhotari
approved these changes
Jun 29, 2026
lhotari
pushed a commit
that referenced
this pull request
Jun 29, 2026
(cherry picked from commit b14524e)
lhotari
pushed a commit
that referenced
this pull request
Jun 29, 2026
(cherry picked from commit b14524e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PR #26044 made topic policy listeners buffer live updates until the initial topic-policy load completes, so a topic can start with the latest policy state. However,
PersistentTopic.initialize()logs and continues when that initial load fails. In that path, the listener wrapper stays uninitialized, so later live topic-policy updates are buffered forever instead of being delivered to the topic.Modifications
TopicPolicyListenerWrapperwith empty loaded policies when the initial global/local topic-policy lookup fails.Verifying this change
Make sure that the change passes the CI checks.
gradlew :pulsar-broker:test --tests org.apache.pulsar.broker.service.persistent.PersistentTopicTest.testTopicPolicyListenerForwardsLiveUpdatesAfterInitialLoadFailure --rerun-tasks
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes