gaoran10 commented on code in PR #22019:
URL: https://github.com/apache/pulsar/pull/22019#discussion_r1477235397
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1095,20 +1095,19 @@ public void deleteCursorFailed(ManagedLedgerException
exception, Object ctx) {
}
@Override
- public ManagedCursor newNonDurableCursor(Position startCursorPosition)
throws ManagedLedgerException {
+ public ManagedCursor newNonDurableCursor(Position mdPosition) throws
ManagedLedgerException {
Review Comment:
Why need to change this name?
##########
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 {
+ ManagedCursor newNonDurableCursor =
managedLedger.newNonDurableCursor(
+ this.cursor.getMarkDeletedPosition(),
+ managedLedger.randomCursorName("analyze-backlog"));
Review Comment:
```suggestion
managedLedger.randomCursorName("analyze-backlog-"));
```
##########
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:
Do we need to try-catch the entire method?
--
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]