Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2462,10 +2462,20 @@ public void operationComplete() {
mdEntry.newPosition, null);

// Remove from the individual deleted messages all the entries before the new mark delete
// point.
// point. When several mark-delete requests where flushed together (callbackGroup), apply
// the in-memory state mutation of EVERY request in the group, not just the last one.
// Otherwise a cursor reset that was queued before a later ack would have its
// alignAcknowledgeStatusAfterPersisted silently dropped while the reset still reports
// success, leaving the cursor un-moved (see issue #26304).
lock.writeLock().lock();
try {
mdEntry.alignAcknowledgeStatus();
if (mdEntry.callbackGroup != null) {
for (MarkDeleteEntry e : mdEntry.callbackGroup) {
e.alignAcknowledgeStatus();
}
} else {
mdEntry.alignAcknowledgeStatus();
}
} finally {
lock.writeLock().unlock();
}
Expand Down
Loading