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 2022/09/24 10:25:53 UTC

[GitHub] [pulsar] lordcheng10 commented on a diff in pull request #17797: [fix][broker] Update new bundle-range to policies after bundle split

lordcheng10 commented on code in PR #17797:
URL: https://github.com/apache/pulsar/pull/17797#discussion_r979219028


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -959,6 +970,37 @@ void splitAndOwnBundleOnceAndRetry(NamespaceBundle bundle,
         });
     }
 
+    /**
+     * Update new bundle-range to admin/policies/namespace.
+     * Update may fail because of concurrent write to Zookeeper.
+     *
+     * @param nsname
+     * @param nsBundles
+     * @throws Exception
+     */
+    private CompletableFuture<Void> updateNamespaceBundlesForPolicies(NamespaceName nsname,
+                                                                      NamespaceBundles nsBundles) {
+        checkNotNull(nsname);
+        checkNotNull(nsBundles);
+
+        return pulsar.getPulsarResources().getNamespaceResources().getPoliciesAsync(nsname).thenCompose(optPolicies -> {

Review Comment:
   OK



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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org