jiazhai commented on a change in pull request #9193:
URL: https://github.com/apache/pulsar/pull/9193#discussion_r556918579



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
##########
@@ -812,7 +812,7 @@ protected boolean isNamespaceReplicated(NamespaceName 
namespaceName) {
         try {
             String topicPartitionPath = joinPath(MANAGED_LEDGER_PATH_ZNODE,
                     namespaceName.toString(), topicDomain.value());
-            List<String> topics = globalZk().getChildren(topicPartitionPath, 
false);
+            List<String> topics = localZk().getChildren(topicPartitionPath, 
false);

Review comment:
       Thanks @aloyszhang , This change lgtm. As @codelipenghui mentioned, it 
would be great if we have it reproduced and fixed in the unit test.  
   How about we create 2 mocked zk in the `MockedPulsarServiceBaseTest`, 1 zk 
for localZk() and another for globalZk? By this way, we could reproduce this 
error in the original code, and verify it fixed by this change.




----------------------------------------------------------------
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:
[email protected]


Reply via email to