poorbarcode commented on code in PR #26184:
URL: https://github.com/apache/pulsar/pull/26184#discussion_r3570708156
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -1275,6 +1275,12 @@ public int
getNonContiguousDeletedMessagesRangeSerializedSize() {
@Override
public long getEstimatedSizeSinceMarkDeletePosition() {
+ Position markDeletePosition = this.markDeletePosition;
+ Position lastPosition = ledger.getLastPosition();
+ if (markDeletePosition == null ||
markDeletePosition.compareTo(lastPosition) >= 0) {
Review Comment:
These two judgment conditions should be added:
1. `cursor.markDeletePosition` is no longer in the ledger list
2. The ledger of `ledger.latestLedger` has no entry at all
Otherwise, we need to throw an error, which means the positions are not
expected
--
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]