-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][misc] Topic name from persistence name should decode local name #22879
[fix][misc] Topic name from persistence name should decode local name #22879
Conversation
ffb901b
to
ce65db9
Compare
@Shawyeok Just curious to know what the impact of the previous behavior was. Did it cause actual problems? Any error messages in logs? |
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.
LGTM
The method Moreover reviewing references in the Pulsar codebase, I noticed that this may lead to inaccuracies in the topicName label of some offloader metrics. Line 314 in ce65db9
|
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.
LGTM
…apache#22879) (cherry picked from commit c326d8e) (cherry picked from commit dae7d8b)
…apache#22879) (cherry picked from commit c326d8e) (cherry picked from commit dae7d8b)
…apache#22879) (cherry picked from commit c326d8e) (cherry picked from commit dae7d8b)
Motivation
The methods
TopicName#getPersistenceNamingEncoding
andTopicName#fromPersistenceNamingEncoding
should be symmetric. Currently, thelocalName
part of the topic name is encoded into the persistence name, but it is not decoded back properly.Modifications
This update add decoding logic for the
localName
part of the topic name.Verifying this change
This change added tests and can be verified as follows:
org.apache.pulsar.common.naming.TopicNameTest#testFromPersistenceNamingEncoding
that includes topic names with special characters.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: Shawyeok#16