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.2.x] cloud_storage: Fix timequery bug that triggers full scan #16520

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

Lazin
Copy link
Contributor

@Lazin Lazin commented Feb 7, 2024

Timequery can trigger full partition scan if the query overshoots the last segment. In this case if log_reader_config.start_offset is below the first segment in the manifest and log_reader_config.max_offset is above last offset in the manifest we will initialize the scan from the beginning which is very expensive.

Fixes #16479 #16516

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

Bug Fixes

  • Fix timequery error that triggered full partition scan

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.
@piyushredpanda
Copy link
Contributor

/ci-repeat

@piyushredpanda piyushredpanda merged commit 8530f7c into redpanda-data:v23.2.x Feb 8, 2024
22 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants