Skip to content

storage: guard fetchConsumer against recreated topics - #871

Open
SAY-5 wants to merge 1 commit into
linkedin:masterfrom
SAY-5:fix-fetch-consumer-panic
Open

storage: guard fetchConsumer against recreated topics#871
SAY-5 wants to merge 1 commit into
linkedin:masterfrom
SAY-5:fix-fetch-consumer-panic

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 22, 2026

Copy link
Copy Markdown

Fixes #864. When a topic is deleted and recreated between the consumer snapshot and the broker read, fetchConsumer can hit a partition ring with no offsets (index out of range [-1] at the BrokerOffsets read) or a broker partition list shorter than the consumer's (out of range on topicMap[p]). Both now degrade to returning the consumer data without lag for the affected partitions, same as the existing missing-topic case. Added tests that construct both inconsistent states directly; each panics without the guards.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5
SAY-5 requested a review from bai as a code owner July 22, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fetchConsumer panics (index out of range) when a topic is deleted and recreated concurrently

1 participant