GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [Bug] Partial batch ACKs are not scheduled for persistence when individual-delete ranges are empty · Issue #26498 · apache/pulsar Closed DescriptionSearch before reporting
Read release policy
User environment
Issue DescriptionWith batch-index acknowledgment enabled, acknowledging part of a batch can update the cursor in memory without scheduling persistence. The cursor's flush routine also skips the update, so the acknowledgment state can remain unsaved until another operation writes the cursor. Triggering scenarioAssume a durable cursor has persisted its progress through entry E0, with no cursor write pending. E0 is its mark-delete position: all entries up to that position are acknowledged. The next entry, E1, contains two batched messages, A and B. A is acknowledged, but B is still pending. Since A and B share the same stored entry, acknowledging A alone cannot mark E1 as fully deleted. Instead, the cursor updates a batch ACK bitmap. If there are no other fully acknowledged entries beyond E0, the whole-entry deletion ranges (
Expected: a changed batch ACK bitmap should be scheduled for persistence even when the mark-delete position and whole-entry deletion ranges are unchanged. Saving it should not depend on another acknowledgment or cursor close. ImpactIf the broker crashes before another operation persists this bitmap, the stored cursor state has no record of A's acknowledgment. A may therefore be delivered again after recovery. This is a risk of duplicate delivery, not loss of the message itself. A later ACK that triggers persistence, an explicit mark-delete, or a graceful cursor close may save the accumulated bitmap, so the unsaved state is not necessarily visible after every restart. Reproducing the issueThese steps use the managed-ledger API on a durable
The final step writes the bitmap without advancing the cursor, showing that the missing state can be serialized. The batch-record persistence limit is not reached in this scenario. Additional informationRelevant code: partial-ACK update and early return, flush dirty check. Are you willing to submit a PR?
ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |