Repository navigation
[fix][broker] Prevent BookkeeperSchemaStorage and BookkeeperBucketSnapshotStorage from bypassing namespace bookie affinity - #26703
Closed
void-ptr974 wants to merge 2 commits into
Conversation
Resolve topic placement configuration in one shared path and pair it with the cached BookKeeper client and matching ledger metadata. Assisted-by: Codex
…gers Resolve the owner topic before creating schema and delayed-delivery bucket ledgers, then use the shared placement-aware BookKeeper client and persist the matching policy metadata. Preserve arbitrary schema keys and bucket retry semantics. Assisted-by: Codex
This was referenced Sep 24, 2026
Contributor
Author
|
Closing in favor of #26705. The schema and delayed-delivery bucket change remains the second of the three commits in that unified PR, whose description now documents the complete problem, implementation, and impact. |
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 a namespace has a bookie affinity group, or strict bookie affinity selects the isolated placement policy, managed-ledger data uses the matching placement-aware BookKeeper client.
BookkeeperSchemaStorageandBookkeeperBucketSnapshotStorageinstead created their auxiliary ledgers with their independently configured default clients and did not persist the selected placement policy in ledger metadata.As a result, newly created schema and delayed-delivery bucket ledgers could be placed outside the namespace's configured bookie groups. Bookie replacement for those ledgers also lacked the placement metadata needed to preserve the same policy.
Modifications
BucketSnapshotPersistenceException.Impact
Stack
Depends on #26702. This branch contains the dependency commit; the commit specific to this PR is
a7b2ccb439f.Tests
./gradlew :pulsar-broker:test --no-build-cache --tests org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorageTest --tests org.apache.pulsar.broker.service.schema.SchemaServiceTest --tests org.apache.pulsar.broker.delayed.BookkeeperBucketSnapshotStorageTest --tests org.apache.pulsar.broker.delayed.bucket.BookkeeperBucketSnapshotStoragePlacementTest./gradlew :pulsar-broker:checkstyleMain :pulsar-broker:checkstyleTest