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/16 16:51:57 UTC

[GitHub] [pulsar] aloyszhang opened a new pull request #9222: Global zk

aloyszhang opened a new pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222


   Fixes #9207 
   
   ### Motivation
   This PR provide an individual MockZooKeeper instance for test, which is helpful to avoid mis-use of globalZK and localZK.
   
   Besides, this PR also has a fix for max topic for namespace does not work, see #9193 which is only partial fix the problem.
   
   
   


----------------------------------------------------------------
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



[GitHub] [pulsar] jiazhai commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763265821


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang removed a comment on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang removed a comment on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-762636203


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on a change in pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on a change in pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#discussion_r560745783



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
##########
@@ -1147,7 +1147,7 @@ public ServiceUnitId getServiceUnitId(TopicName topicName) throws Exception {
             LOG.debug("Getting children from partitioned-topics now: {}", path);
         }
 
-        return pulsar.getLocalZkCache().getChildrenAsync(path, null).thenCompose(topics -> {
+        return pulsar.getGlobalZkCache().getChildrenAsync(path, null).thenCompose(topics -> {

Review comment:
       of course, thanks for your suggestion.
   




----------------------------------------------------------------
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



[GitHub] [pulsar] jiazhai commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763381227


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] jiazhai commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-761956968


   Thanks @aloyszhang for the great help, seems this change already finds some new issues in the code by misuse global/local zk. let's wait for the test status.


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763516234


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-762636203


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763507435


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763563854


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] jiazhai commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-761767515


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763739353


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang removed a comment on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang removed a comment on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-762539820


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763876966


   @jiazhai  PTAL


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763794829


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] sijie merged pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222


   


----------------------------------------------------------------
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



[GitHub] [pulsar] eolivelli commented on a change in pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#discussion_r560739832



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -2547,7 +2547,7 @@ private void checkTopicLevelPolicyEnable() {
             if (maxTopicsPerNamespace > 0) {
                 String partitionedTopicPath = PulsarWebResource.joinPath(MANAGED_LEDGER_PATH_ZNODE,
                         topicName.getNamespace(), topicName.getDomain().value());
-                List<String> topics = pulsar().getGlobalZkCache().getZooKeeper()
+                List<String> topics = pulsar().getLocalZkCache().getZooKeeper()

Review comment:
       the same here

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
##########
@@ -1147,7 +1147,7 @@ public ServiceUnitId getServiceUnitId(TopicName topicName) throws Exception {
             LOG.debug("Getting children from partitioned-topics now: {}", path);
         }
 
-        return pulsar.getLocalZkCache().getChildrenAsync(path, null).thenCompose(topics -> {
+        return pulsar.getGlobalZkCache().getChildrenAsync(path, null).thenCompose(topics -> {

Review comment:
       this change does not affect only tests and the title of the issue may suggest.
   I see that in the description you cited a partial fix for a bug
   can you please reflect this in the title and state it more clearly in the description ?




----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang removed a comment on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang removed a comment on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763516234






----------------------------------------------------------------
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



[GitHub] [pulsar] sijie merged pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222


   


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-762539820


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Fix mis-use of local/global zk and provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763700952


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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



[GitHub] [pulsar] aloyszhang commented on pull request #9222: Provide different zk for global/local in MockedPulsarServiceBaseTest

Posted by GitBox <gi...@apache.org>.
aloyszhang commented on pull request #9222:
URL: https://github.com/apache/pulsar/pull/9222#issuecomment-763311121


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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