Skip to content

Commit

Permalink
Fix cherry-pick issue
Browse files Browse the repository at this point in the history
  • Loading branch information
codelipenghui committed Jul 30, 2021
1 parent 1939fa8 commit 922fcd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ public CompletableFuture<TopicPolicies> getTopicPoliciesBypassCacheAsync(TopicNa
public CompletableFuture<Void> addOwnedNamespaceBundleAsync(NamespaceBundle namespaceBundle) {
CompletableFuture<Void> result = new CompletableFuture<>();
NamespaceName namespace = namespaceBundle.getNamespaceObject();
if (NamespaceService.checkHeartbeatNamespace(namespace) != null
|| NamespaceService.checkHeartbeatNamespaceV2(namespace) != null) {
if (NamespaceService.checkHeartbeatNamespace(namespace) != null) {
result.complete(null);
return result;
}
Expand Down Expand Up @@ -210,8 +209,7 @@ public CompletableFuture<Void> addOwnedNamespaceBundleAsync(NamespaceBundle name
@Override
public CompletableFuture<Void> removeOwnedNamespaceBundleAsync(NamespaceBundle namespaceBundle) {
NamespaceName namespace = namespaceBundle.getNamespaceObject();
if (NamespaceService.checkHeartbeatNamespace(namespace) != null
|| NamespaceService.checkHeartbeatNamespaceV2(namespace) != null) {
if (NamespaceService.checkHeartbeatNamespace(namespace) != null) {
return CompletableFuture.completedFuture(null);
}
AtomicInteger bundlesCount = ownedBundlesCountPerNamespace.get(namespace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,6 @@ public void testDoNotCreateSystemTopicForHeartbeatNamespace() {
pulsar.getBrokerService().getTopics().forEach((k, v) -> {
TopicName topicName = TopicName.get(k);
assertNull(NamespaceService.checkHeartbeatNamespace(topicName.getNamespaceObject()));
assertNull(NamespaceService.checkHeartbeatNamespaceV2(topicName.getNamespaceObject()));
});
}

Expand Down

0 comments on commit 922fcd4

Please sign in to comment.