-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Filter system topic when getting topic list by binary proto. #19667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shibd
These system topics are defined by PIP-178. Could we only filter out these topics instead of all system topics?
Hi @liangyepianzhou
Could you review this PR?
Why? I think we should filter all system topics, these topics should be invisible to the user. |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Show resolved
Hide resolved
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
we should cherry pick this to branch-2.11
Motivation
In v2.11.0, the system topic enables by default. This causes the
GET_TOPICS_OF_NAMESPACEcommand to return the system topic redundantly.And, If the transaction is enabled, the transaction-related system topic will return by the client(
__transaction_buffer_snapshot, __transaction_buffer_snapshot_segments, __transaction_buffer_snapshot_indexes). This PR filters some transaction-related topics, but these are missing.This causes some incompatibility issues: If consumers use pattern subscribe and the pattern is
/tenant/namespace/.*, it will subscribe to these system topics.Discuss mail: https://lists.apache.org/thread/qhm0zbfw0wfd1m5vj977w002qmkr5lt9
Modifications
Verifying this change
testBinaryProtoSubscribeAllTopicOfNamespacewill cover the don't subscribe system topic.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: shibd#21