Technoboy- commented on a change in pull request #14486:
URL: https://github.com/apache/pulsar/pull/14486#discussion_r815716291
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -3051,7 +3051,15 @@ public void markDeleteComplete(Object ctx) {
@Override
public void markDeleteFailed(ManagedLedgerException exception,
Object ctx) {
- log.warn("[{}][{}] Failed to flush mark-delete position",
ledger.getName(), name, exception);
+ //They throw an IllegalArgumentException when the mark deletes
a position that has already been deleted.
+ //See this#setAcknowledgedPosition
+ if (exception.getCause() instanceof IllegalArgumentException) {
Review comment:
For ManagedCursorImpl#setAcknowledgedPosition, could we add a new
exception :
```
if (newMarkDeletePosition.compareTo(markDeletePosition) < 0) {
throw new AlreadySetMarkDeleteException("Mark deleting an already
mark-deleted position");
}
```
or print log here?
```
if (newMarkDeletePosition.compareTo(markDeletePosition) < 0) {
log.warn("Mark deleting an already mark-deleted position : {}",
newMarkDeletePosition);
return markDeletePosition;
}
```
@mattisonchao @codelipenghui @merlimat
--
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]