mattisonchao commented on code in PR #18007:
URL: https://github.com/apache/pulsar/pull/18007#discussion_r996596014
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -1980,7 +1982,7 @@ void internalMarkDelete(final MarkDeleteEntry mdEntry) {
}
PositionImpl inProgressLatest =
INPROGRESS_MARKDELETE_PERSIST_POSITION_UPDATER.updateAndGet(this, current -> {
- if (current != null && current.compareTo(mdEntry.newPosition) > 0)
{
+ if (current != null && current.compareTo(mdEntry.newPosition) >=
0) {
Review Comment:
If `current` is equal to `mdEntry.newPosition`, what is the difference
between returning `current` and `mdEntry.newPosition`?
The `PositionImpl` already override the equals 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]