You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "AnonHxy (via GitHub)" <gi...@apache.org> on 2023/04/20 09:39:43 UTC

[GitHub] [pulsar] AnonHxy commented on a diff in pull request #20152: [fix][admin] Fix examine messages if total message is zero

AnonHxy commented on code in PR #20152:
URL: https://github.com/apache/pulsar/pull/20152#discussion_r1172340384


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -3045,6 +3045,10 @@ protected CompletableFuture<Response> internalExamineMessageAsync(String initial
                     try {
                         PersistentTopic persistentTopic = (PersistentTopic) topic;
                         long totalMessage = persistentTopic.getNumberOfEntries();
+                        if(totalMessage <= 0) {
+                            throw new RestException(Status.INTERNAL_SERVER_ERROR,

Review Comment:
   Great. 412 accepted



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