poorbarcode commented on code in PR #23088: URL: https://github.com/apache/pulsar/pull/23088#discussion_r1694746685
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java: ########## @@ -1201,6 +1203,21 @@ public long estimateBacklogSize() { } public SubscriptionStatsImpl getStats(GetStatsOptions getStatsOptions) { + // So far, there is no case hits this check. + if (getStatsOptions.isGetEarliestTimeInBacklog()) { + throw new IllegalArgumentException("Calling the sync method subscription.getStats with" Review Comment: > @Deprecated has been added, why add this check, we will clean up this method in the future. > IDE can help us to check the @Depercated. It prevents PR containing incorrect usage from being merged without adequate review, so it is needed. -- 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