Repository navigation
[fix][client] Enable TableView compacted reads for short topic names - #26626
Merged
Merged
Conversation
Resolve the topic domain before configuring compacted reads and initial replay. Assisted-by: OpenAI Codex
lhotari
requested review from
Technoboy-,
dao-jun,
david-streamlio,
merlimat and
nodece
September 17, 2026 07:05
Return an empty last-message list from the reader mock now that short names correctly use the persistent replay path. Assisted-by: OpenAI Codex
nodece
approved these changes
Sep 17, 2026
2 of 14 tasks
Radiancebobo
pushed a commit
to Radiancebobo/pulsar
that referenced
this pull request
Oct 8, 2026
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.
Fixes #26625
Motivation
TableView accepts short persistent topic names such as
tenant/ns/topicnameandtopicname, but checks the raw name for apersistentprefix. These names therefore disable compacted reads and allow creation to complete before the initial replay finishes.Modifications
Resolve the topic with
TopicName.get()and compare its domain withTopicDomain.persistent. Add a parameterized regression test covering both short forms, an explicit persistent name, a short name beginning withpersistent, and an explicit non-persistent name. The test checks compacted-reader configuration and whether creation waits for the initial replay. Configure the existing builder test reader mock to return an empty last-message list for this replay path.Verifying this change
The new regression test fails on unpatched code because
readCompacted(true)is not called for a short persistent name../gradlew :pulsar-client-original:test --tests '*TableView*Test' -PtestRetryCount=0— all 21 cases pass../gradlew spotlessCheck checkstyleMain checkstyleTest— passes.Make sure that the change passes the CI checks.
Does this pull request potentially affect one of the following parts: