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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -880,12 +880,22 @@ void splitAndOwnBundleOnceAndRetry(NamespaceBundle bundle,
                                     for (NamespaceBundle sBundle : 
splittedBundles.getRight()) {
                                         
checkNotNull(ownershipCache.tryAcquiringOwnership(sBundle));
                                     }
+                                    updateNamespaceBundlesForPolicies(nsname, 
splittedBundles.getLeft())
+                                            .exceptionally(e -> {
+                                                String msg = format("failed to 
update namespace policies [%s], "
+                                                                + 
"NamespaceBundle: %s due to %s",
+                                                        nsname.toString(), 
bundle.getBundleRange(), e.getMessage());
+                                                LOG.warn(msg);
+                                                
updateFuture.completeExceptionally(

Review Comment:
   I add an order guarantee: updateNamespaceBundlesForPolicies is only executed 
after updateNamespaceBundles is executed successfully!
   
   @Jason918 PTAL,thanks!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to