You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/06 06:59:21 UTC
[GitHub] [pulsar] tomscut commented on a change in pull request #11965: fix issues 11964, deadlock bug when use key_shared mode
tomscut commented on a change in pull request #11965:
URL: https://github.com/apache/pulsar/pull/11965#discussion_r722940221
##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -2021,7 +2020,12 @@ public void asyncDelete(Iterable<Position> positions, AsyncCallbacks.DeleteCallb
callback.deleteFailed(getManagedLedgerException(e), ctx);
return;
} finally {
- lock.writeLock().unlock();
+ if (individualDeletedMessages.isEmpty()) {
Review comment:
Good catch. Can we change the code to something like this:
```
finally {
lock.writeLock().unlock();
if (individualDeletedMessages.isEmpty()) {
callback.deleteComplete(ctx);
}
}
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org