Skip to content

[Bug] Topic list watcher will miss changes while metadata store connection is disconnected #25020

Closed

Description

@lhotari

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

Any released version

Issue Description

This org.apache.pulsar.broker.service.TopicListService implementation doesn't currently handle session events (org.apache.pulsar.metadata.api.extended.SessionEvent) at all.

The consequence of this is that the state on the client side can get out of sync when the metadata store session has a temporary disruption.

Error messages

None

Reproducing the issue

Additional information

One potential solution is to retrieve the list of topics for the namespace after the metadata store session resumes after disconnection. It could then compare the changes and reconstruct the missed add/delete events to send to the client.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    type/bug
    on Nov 26, 2025
  2. lhotari commented on Dec 2, 2025

    @lhotari
    MemberAuthor

    One potential solution is to retrieve the list of topics for the namespace after the metadata store session resumes after disconnection. It could then compare the changes and reconstruct the missed add/delete events to send to the client.

    I think this could be useful. The client implementation needs a change since by now, the hash has been ignored.

    The correct approach should be to restart the topic watcher or request a full topic listing if the hash doesn't match after applying the changes. This way the client could be kept in sync with the actual state on the broker side.

  3. oneby-wang commented on Dec 16, 2025

    @oneby-wang
    Contributor

    Hi, @lhotari are you working on this? If this issue is not assigned, I would like to help fix this.

  4. self-assigned this
    on Dec 16, 2025
  5. lhotari commented on Dec 16, 2025

    @lhotari
    MemberAuthor

    Hi, @lhotari are you working on this? If this issue is not assigned, I would like to help fix this.

    @oneby-wang Yes, I'm working on this. Btw. There's also PIP-442 part 2 (#25070) which contains a fix for a case where initial change events are lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions