Skip to content

fix index truncate edge cases#4501

Open
Shubham8287 wants to merge 2 commits intomasterfrom
shub/fix-index-truncate
Open

fix index truncate edge cases#4501
Shubham8287 wants to merge 2 commits intomasterfrom
shub/fix-index-truncate

Conversation

@Shubham8287
Copy link
Contributor

@Shubham8287 Shubham8287 commented Feb 28, 2026

Description of Changes

Index offset truncate methods returns IndexError::KeyNotFound when asked to truncate on empty index offset file or the key in input is smaller than the first entry.

This was causing commitlog::reset_to method to return error, and stuck replicas in re-spawn loop.

API and ABI breaking changes

NA

Expected complexity level and risk

1

Testing

Added new tests to cover edge scenerios.

@Shubham8287 Shubham8287 requested a review from kim February 28, 2026 16:05
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.

1 participant