You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/13 22:36:41 UTC

[GitHub] [pulsar] jiazhai commented on a change in pull request #9193: fix max topic for namespace does not work

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:
users@infra.apache.org