forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cloud_storage: kafka::offset lookup in partition_manifest
When serving a fetch request by a kafka::offset, we previously used the `partition_manifest` to perform a segment lookup by `kafka::offset_cast(ko)` first in order to traverse the segments forward to find the actual segment that contained `ko`. This doesn't work when the manifest has been truncated, e.g. if the casted offset falls before the start of the manifest, we would previously return that no segment exists for the fetch. This could result in segments erronesouly not being returned, and fetches erroneously being met with no data when some existed. This commit fixes the behavior to no longer use the casted segment lookup and adds some test coverage for kafka::offset lookups. Fixes redpanda-data#7708
- Loading branch information
Showing
2 changed files
with
164 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters