Fix issues 11964, deadlock bug when use key_shared mode
@@ -1993,7 +1993,6 @@ public class ManagedCursorImpl implements ManagedCursor {
if (individualDeletedMessages.isEmpty()) {
// No changes to individually deleted messages, so nothing to do at this point
- callback.deleteComplete(ctx);
return;
}
@@ -2025,6 +2024,9 @@ public class ManagedCursorImpl implements ManagedCursor {
return;
} finally {
lock.writeLock().unlock();
+ if (individualDeletedMessages.isEmpty()) {
+ callback.deleteComplete(ctx);
+ }
}
// Apply rate limiting to mark-delete operations
