lhotari commented on code in PR #15031:
URL: https://github.com/apache/pulsar/pull/15031#discussion_r842887286
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2097,6 +2102,22 @@ public void markDeleteFailed(ManagedLedgerException
exception, Object ctx) {
}
}
+ // update lastMarkDeleteEntry field if newPosition is later than the
current lastMarkDeleteEntry.newPosition
+ private void updateLastMarkDeleteEntryToLatest(final PositionImpl
newPosition,
+ final Map<String, Long>
properties) {
+ LAST_MARK_DELETE_ENTRY_UPDATER.updateAndGet(this, last -> {
+ if (last != null && last.newPosition.compareTo(newPosition) > 0) {
+ // keep current value, don't update
Review Comment:
there would be a lot of logging since it's very common that it would happen.
--
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]