eolivelli commented on code in PR #15031:
URL: https://github.com/apache/pulsar/pull/15031#discussion_r842889574
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -1796,7 +1796,14 @@ void internalMarkDelete(final MarkDeleteEntry mdEntry) {
// ledger is postponed to when the counter goes to 0.
PENDING_MARK_DELETED_SUBMITTED_COUNT_UPDATER.incrementAndGet(this);
- lastMarkDeleteEntry = mdEntry;
+ LAST_MARK_DELETE_ENTRY_UPDATER.updateAndGet(this, last -> {
+ if (last != null &&
last.newPosition.compareTo(mdEntry.newPosition) > 0) {
+ // keep the current value since it's later then the
mdEntry.newPosition
Review Comment:
then we can add DEBUG in the other branch, the "new" code that you are adding
--
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]