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


##########
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 wonder what will happen if updateFuture completeExceptionally here and 
complete success in L896(after updateNamespaceBundles success).
   
   Local policies were updated successfully, but policies update failed.
   
   > There is no executing order guarantee for these two ops.
   
   I can add an order guarantee: updateNamespaceBundlesForPolicies is only 
executed after updateNamespaceBundles is executed successfully.



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