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

[v23.3.x] cloud_storage: Fix timequery bug that triggers full scan #16518

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #16503
Fixes: #16517,

Use timestamp to generate segments.

(cherry picked from commit fff0d14)
Add new overload of the 'scan_remote_partition' function used in tests.
This overload uses timequery. Also, add timestamps to the metadata.

(cherry picked from commit 6d18fad)
Add extra fields without exposing them to the metrics endpoint. The
fields are bytes_skipped and bytes_accepted. Also, add accessor methods
so the probe values could be read programmatically.

(cherry picked from commit 04ac537)
Update bytes_skip when the batches are skipped in the segment reader.
Update bytes_accept when the batches are accepted.

(cherry picked from commit adefd4c)
The new test uses remote_partition test code but performs timequery.
It reproduces the issue from 16479 among other things.

(cherry picked from commit f9a9afe)
The remote_partition_reader can reset to the begining of the partition
in case if it didn't find the segment and both config.start_offset and
config.max_offset are outside of the manifest. When this logic is
applied to the timequery in case if timestamp overshoots last segment in
the manifest we end up having a full partition scan. This commit fixes
this by disabling this logic for timequeries.

(cherry picked from commit f4f6743)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Feb 7, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Feb 7, 2024
@Lazin
Copy link
Contributor

Lazin commented Feb 7, 2024

CI failiure is #14655

@piyushredpanda piyushredpanda merged commit 3e85b38 into redpanda-data:v23.3.x Feb 7, 2024
16 of 18 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.5 Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants