Skip to content

[#2944] Simplify durable-topic sequence recovery on restart - #2947

Open
cshannon wants to merge 1 commit into
apache:mainfrom
cshannon:gh-2944-durable-restart
Open

cshannon wants to merge 1 commit into
apache:mainfrom
cshannon:gh-2944-durable-restart

Conversation

@cshannon

@cshannon cshannon commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Refs #2944.

This is primarily a cleanup. KahaDB now reads the last endpoint of each durable subscriber’s sorted pending-ack ranges instead of walking every pending sequence. The on-disk format is unchanged.

Pending messages per subscriber Pending-ack recovery block, before → after
8,096 100.2 → 4.8 µs
65,536 790.3 → 5.7 µs

Four paired JVM runs with 16 durable subscribers and a warm filesystem cache. The recovery block got faster, but total KahaDB restart time was effectively unchanged in the rerun.

Validation: 34 targeted tests passed, including a new regression that verifies the first publish after restart gets the correct sequence when unmatched acknowledgments removed the newest messages.

…endpoints

Use the endpoint of each sorted pending-ack range set instead of visiting every sequence during index load. Preserve next-sequence recovery when unmatched acknowledgments removed the newest messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant