GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [fix][ml] Fix batch ACK index loss when recovering cursor from MetadataStore by void-ptr974 · Pull Request #26474 · apache/pulsar

Conversation

@void-ptr974

@void-ptr974 void-ptr974 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

When a cursor is cleanly closed using the MetadataStore persistence path, partial batch acknowledgment indexes are written to ManagedCursorInfo. The cursorsLedgerId == -1 recovery path restored the mark-delete position, individual deleted-message ranges, and properties, but skipped batchedEntryDeletionIndexInfos. After topic unload/reload or another cursor reconstruction, already acknowledged messages within a batch could therefore be redelivered.

Modifications

  • Restore persisted batch deletion indexes from ManagedCursorInfo in the MetadataStore recovery path.
  • Keep recovery gated by batch-index acknowledgment being enabled and by metadata containing batch records, preserving compatibility with old metadata and disabled configurations.
  • Add ManagedCursor recovery coverage for MetadataStore and BookKeeper paths, persistence limits, cross-word bitmaps, missing metadata, disabled batch-index ACK, and combined cursor state.
  • Add a Shared consumer end-to-end test using real producer batching, topic unload, a new client, and an explicitly rebuilt cursor.

Verifying this change

  • ./gradlew :managed-ledger:test --tests '*ManagedCursorBatchAckRecoveryTest' -PtestRetryCount=0 -PtestFailFast=false
  • ./gradlew :pulsar-broker:test --tests '*ManagedCursorBatchAckMetadataStoreRecoveryTest' -PtestRetryCount=0 -PtestFailFast=false
  • ./gradlew quickCheck

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@void-ptr974
[fix][ml] Fix batch ACK index loss when recovering cursor from Metada…
532976b
…taStore

Assisted-by: Codex
This was referenced Sep 6, 2026
[Bug] Persisted batch ACK indexes are not restored from MetadataStore #26475
Open
[Bug] Partial batch ACKs are not scheduled for persistence when individual-delete ranges are empty #26498
Closed
merlimat
merlimat approved these changes Sep 9, 2026
View reviewed changes
@merlimat
merlimat merged commit 5a47023 into apache:master Sep 9, 2026
44 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lhotari lhotari mentioned this pull request Sep 11, 2026
[fix][txn] Stop the pending ack replay loop from spinning forever #26369
Merged
9 of 10 tasks
@lhotari lhotari added this to the 5.0.0-M2 milestone Sep 12, 2026
@lhotari lhotari added release/4.2.5 release/4.0.14 labels Sep 23, 2026
lhotari pushed a commit that referenced this pull request Sep 23, 2026
@void-ptr974 @lhotari
[fix][ml] Fix batch ACK index loss when recovering cursor from Metada…
5daa008
…taStore (#26474)

(cherry picked from commit 5a47023)
@lhotari lhotari added the cherry-picked/branch-4.2 label Sep 23, 2026
lhotari pushed a commit that referenced this pull request Sep 23, 2026
@void-ptr974 @lhotari
[fix][ml] Fix batch ACK index loss when recovering cursor from Metada…
d00e38b
…taStore (#26474)

(cherry picked from commit 5a47023)
@lhotari lhotari added the cherry-picked/branch-4.0 label Sep 23, 2026
Radiancebobo pushed a commit to Radiancebobo/pulsar that referenced this pull request Oct 8, 2026
@void-ptr974 hechengbo
[fix][ml] Fix batch ACK index loss when recovering cursor from Metada…
5857e15
…taStore (apache#26474)
This was referenced Oct 17, 2026
[improve][broker] Recover batch deleted Index when cursor recover from metadataStore. #20018
Closed
[Bug] Batch deleted Index lost when cursor recover from metadataStore #20585
Closed
@nodece nodece mentioned this pull request Nov 5, 2026
[fix][ml][broker][client] Sync branch-as-4.0 with apache branch-4.0 (2026-09 to 2026-11, 159 commits) ascentstream/pulsar#109
Merged
4 of 5 tasks
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Nov 16, 2026
@void-ptr974 @nodece
[fix][ml] Fix batch ACK index loss when recovering cursor from Metada…
9689687
…taStore (apache#26474)

(cherry picked from commit 5a47023)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@merlimat merlimat merlimat approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cherry-picked/branch-4.0 cherry-picked/branch-4.2 release/4.0.14 release/4.2.5

Projects

None yet

Milestone

5.0.0-M2

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@void-ptr974 @merlimat @lhotari
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.