berg223 commented on code in PR #24376: URL: https://github.com/apache/pulsar/pull/24376#discussion_r2127876424
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java: ########## @@ -1315,7 +1315,9 @@ public CompletableFuture<SubscriptionStatsImpl> getStatsAsync(GetStatsOptions ge SubType subType = getType(); subStats.type = getTypeString(); if (dispatcher instanceof PersistentDispatcherSingleActiveConsumer) { - Consumer activeConsumer = ((PersistentDispatcherSingleActiveConsumer) dispatcher).getActiveConsumer(); + PersistentDispatcherSingleActiveConsumer d = ((PersistentDispatcherSingleActiveConsumer) dispatcher); + subStats.unackedMessages = d.getUnackedMessages(); Review Comment: We shouldn't sum unackedMessages for all consumers in fail over subscription. So it will be more clear if we set the value here. -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org