Skip to content

Commit

Permalink
fix max topic for namespace does not work (apache#9193)
Browse files Browse the repository at this point in the history
This PR fix max topic for namespace does not work.

Max topic configuration for namespace does not work well. This is caused by currently we use globalZK to get the children node of "/managed-ledgers/tenant/namespace/domain" when caculate the number of existed topics.

Znode of "/managed-ledgers/tenant/namespace/domain" should be accessed by localZK instead.
  • Loading branch information
aloyszhang authored Jan 14, 2021
1 parent 7b65fab commit e9fd7f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ protected List<String> getTopicPartitionList(TopicDomain topicDomain) {
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);
topicPartitions = topics.stream()
.map(s -> String.format("%s://%s/%s", topicDomain.value(), namespaceName.toString(), decode(s)))
.collect(Collectors.toList());
Expand Down

0 comments on commit e9fd7f1

Please sign in to comment.