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/01 03:27:22 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #17370: [fix][broker] Fix Npe thrown by splitBundle

codelipenghui commented on code in PR #17370:
URL: https://github.com/apache/pulsar/pull/17370#discussion_r960186330


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -1158,6 +1158,9 @@ protected CompletableFuture<Void> internalSplitNamespaceBundleAsync(String bundl
                 .thenCompose(__ -> getNamespacePoliciesAsync(namespaceName))
                 .thenCompose(policies->{
                     String bundleRange = getBundleRange(bundleName);
+                    if (bundleRange == null) {
+                        throw new RestException(Status.PRECONDITION_FAILED, "Failed to find a bundleRange");

Review Comment:
   It should be 404, not 412?
   And the error message should be `Bundle range xxx not found`



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