gaoran10 commented on code in PR #22019:
URL: https://github.com/apache/pulsar/pull/22019#discussion_r1477624320


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java:
##########
@@ -530,111 +530,132 @@ public String getTypeString() {
         return "Null";
     }
 
-    @Override
     public CompletableFuture<AnalyzeBacklogResult> 
analyzeBacklog(Optional<Position> position) {
+        final ManagedLedger managedLedger = topic.getManagedLedger();
+        try {

Review Comment:
   Could we create a param out of try-catch block for nonDurableCursor? Such as 
this.
   
   ```
   ManagedCursor newNonDurableCursor = null;
   try {
       newNonDurableCursor = 
managedLedger.newNonDurableCursor(PositionImpl.EARLIEST);
   } catch (ManagedLedgerException e) {
       throw new RuntimeException(e);
   }
   Position currentPosition = newNonDurableCursor.getMarkDeletedPosition();
   ```



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