Skip to content

[fix][broker] Fix incorrect listener URLs returned by ModularLoadManager lookups - #26245

Merged
lhotari merged 1 commit into
apache:masterfrom
void-ptr974:fix/lookup-inflight-options
Jul 25, 2026
Merged

[fix][broker] Fix incorrect listener URLs returned by ModularLoadManager lookups#26245
lhotari merged 1 commit into
apache:masterfrom
void-ptr974:fix/lookup-inflight-options

Conversation

@void-ptr974

Copy link
Copy Markdown
Contributor

Fixes #26244

Motivation

ModularLoadManager coalesces in-flight lookup requests by namespace bundle alone. Concurrent requests for the same bundle with different advertised listener options can therefore share a LookupResult generated for another request and receive the wrong broker URL. Requests with different read-only or topic-preload semantics can also be coalesced.

Modifications

  • Key in-flight lookup requests by the options that affect their result or side effects.
  • Preserve the existing authoritative-request separation and coalescing for equivalent requests.
  • Add regression coverage for binary and web advertised listeners, read-only and topic-preload options.

Verification

  • ./gradlew :pulsar-broker:test --tests org.apache.pulsar.broker.namespace.NamespaceServiceLookupOptionsTest
  • ./gradlew :pulsar-broker:checkstyleMain :pulsar-broker:checkstyleTest

@void-ptr974 void-ptr974 changed the title [fix][broker] Keep ModularLoadManager lookup requests option-aware [fix][broker] Fix incorrect listener URLs returned by ModularLoadManager lookups Jul 25, 2026
@lhotari lhotari added this to the 5.0.0-M2 milestone Jul 25, 2026
@lhotari
lhotari merged commit 931f9fb into apache:master Jul 25, 2026
44 of 45 checks passed
Comment on lines 474 to 478
if (options.isAuthoritative()) {
targetMap = findingBundlesAuthoritative;
} else {
targetMap = findingBundlesNotAuthoritative;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already merged this and after merging I noticed that having 2 separate maps would no longer be necessary if authoritative would be part of the key as well.

lhotari pushed a commit that referenced this pull request Jul 25, 2026
lhotari pushed a commit that referenced this pull request Jul 25, 2026
sandeep-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 31, 2026
sandeep-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 31, 2026
sandeep-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 31, 2026
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Aug 28, 2026
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.

[Bug] ModularLoadManager lookup can return the wrong advertised listener under concurrency

2 participants