michaeljmarshall opened a new pull request #10254:
URL: https://github.com/apache/pulsar/pull/10254


   ### Motivation
   
   In reading through the system topic code, I noticed that there are some edge 
cases where normal topics might be considered system topics. This PR should 
remove that possibility.
   
   I have a few questions on implementation. I will put comments on the lines 
where I have questions.
   
   ### Modifications
   
   1. Updated the `isSystemTopic` method to just check for presence the system 
topic prefix (`__`). This change could be problematic if end users are already 
using topic names with the system topic prefix.
   2. Use a topic's `localName` to check for equality instead of `endsWith`. In 
the current implementation, a user could have a topic with the local name 
`my__change_events`, and because it "ends with" `__change_events`, it would be 
considered a system topic.
   3. Update the documentation on topic names to warn about the system topic 
prefix.
   
   ### Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Documentation
   
   System topics were introduced in pulsar 2.6.0. I updated the documentation 
for all versions since then to indicate that users should avoid creating topics 
that begin with `__`. This is important because if there are to be additional 
system topics, we want to make sure there are not accidentally naming 
collisions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to