Skip to content

LiteTopic provider fabricates zero backlog, iterates nondeterministic broker addresses and mixes quota master sets #7418

Backlog

Description

@NUAAwqy

Phenomenon

Three read paths in the LiteTopic (LMQ) provider report fabricated or mixed-up data instead of what the brokers actually returned:

  1. RocketMQLiteTopicProvider.groupLag - used to build the totalBacklog column of the LiteTopics list - swallows every getLiteGroupInfo failure and contributes a fabricated 0. The brokers it reads are exactly the ones that reported the group binding, so a failed read is not "empty backlog": the list renders "fully consumed" while the read actually failed. The session detail path (sessionGroupLag) already throws 502 for the identical read (pinned by getSessionShouldSurfaceBacklogReadFailureTest), so the two views disagree.
  2. masterAddresses falls back to brokerAddrs.values().iterator().next() when a broker registers no master address - whichever entry the address map happens to iterate first, possibly a slave, and different across runs. Both cluster views (RocketMQClusterProvider.buildBrokerList, RealClusterProvider.toBrokerVO) already resolve this case to the lowest surviving broker id.
  3. getQuota adds a master's current lite subscription count even when that master's broker config (which holds the session cap) is unreadable, so the quota ratio is built from two different master sets - the exact mix the info == null skip in the same loop deliberately avoids.

Root cause

Unmeasured reads default to zero, an address map's iteration order decides which broker serves the lite reads, and one quota input failing leaves the numerator and denominator computed over different broker sets.

Impact

Operators see "0 backlog" on LiteTopics whose backlog read failed, lite reads land on nondeterministic addresses, and the cluster-wide LiteTopic quota can overstate its utilisation when one master's config cannot be read.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions