Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last_epochs_offsets could potentially return offsets pointing to missing data #145

Open
kjnilsson opened this issue Sep 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kjnilsson
Copy link
Contributor

Describe the bug

This function does not check that an entry in the index is also valid in the segment and thus can return values that are not valid. For normal operation this is fine as the index is always written to after the segment. However if there is an unclean node shutdown where the page cache is lost it is/appears possible that the index will contain data not also present in the segment (due to data re-ordering at the storage layer or file system).

Reproduction steps

  1. Truncating some data from the segment file then running the function should be sufficient to show it returning offsets not present in the segment.

Expected behavior

It should include only valid epoch offsets.

Additional context

No response

@kjnilsson kjnilsson added the bug Something isn't working label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant