Repository navigation
[fix][broker] Propagate bundle split failures to the completion future - #26735
Merged
Merged
Conversation
Handle failures from the splitBundles dependent stage so namespace splitting does not remain pending. Add broker-group regression coverage for immediate and delayed bundle cache load failures. Assisted-by: OpenAI Codex
ascentstream-bot
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Oct 1, 2026
apache#26735) Co-authored-by: zhanghao <[email protected]> (cherry picked from commit 4e098ac)
ascentstream-bot
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Oct 2, 2026
apache#26735) Co-authored-by: zhanghao <[email protected]> (cherry picked from commit 4e098ac)
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
When using a non-extensible load manager, a failed bundle cache load can leave the future returned by
NamespaceService.splitAndOwnBundle()pending indefinitely.In
splitAndOwnBundleOnceAndRetry(), the stage returned bysplitBundles(...).thenAccept(...)is discarded. IfsplitBundles()completes exceptionally, the success callback is skipped andupdateFutureis never completed. The outer completion future consequently remains pending.The surrounding
try/catchdoes not handle exceptional future completion, including when the returned future has already failed. The ownership-release timeout does not cover this failure because it is only installed after the namespace bundle update succeeds.Modifications
splitBundles(...).thenAccept(...)and propagate them toupdateFuture, allowing the existing failure-handling path to complete the outer future.NamespaceServiceSplitFailureTestin thebrokertest group, covering both an already-failed policies read and a policies read that fails aftersplitAndOwnBundle()returns.Verifying this change
[fix][broker] Propagate bundle split failures to the completion future zhanghaou/pulsar#9
The new parameterized regression test asserts that the outer future completes exceptionally with
ServiceUnitNotReadyExceptionin both failure timings.Local validation:
quickCheckpasses../gradlew :pulsar-broker:test \ --tests 'org.apache.pulsar.broker.namespace.NamespaceServiceSplitFailureTest' \ -PtestRetryCount=0 \ -PtestFailFast=false ./gradlew quickCheckDoes this pull request potentially affect one of the following parts: