feat: scan with sst minimal sequence#6051
Merged
MichaelScofield merged 3 commits intomainfrom May 8, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces functionality to filter out unwanted SST files during a scan operation by adding a new "sst_min_sequence" field to the scan request, which is propagated through various components of the system. Key changes include:
- Adding the "sst_min_sequence" field and its documentation in the ScanRequest.
- Propagating and processing the field in QueryContext and within the scan logic in the engine.
- Updating tests to verify that the minimal SST sequence filtering works as expected.
- Bumping the greptime-proto dependency version in Cargo.toml.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/store-api/src/storage/requests.rs | Added sst_min_sequence field with accompanying docs |
| src/session/src/context.rs | Updated QueryContext and its builder to include sst_min_sequences |
| src/query/src/dummy_catalog.rs | Adjusted TableProviderFactory to create TableProvider with new scan request |
| src/mito2/src/read/scan_region.rs | Integrated sst_min_sequence filtering into scan logic |
| src/mito2/src/engine/scan_test.rs | Added tests for sst_min_sequence filtering |
| src/mito2/src/engine/projection_test.rs | Updated test to use Default for ScanRequest values |
| src/mito2/src/engine.rs | Included new scan test module |
| src/metric-engine/src/metadata_region.rs | Updated ScanRequest creation to use Default values |
| src/common/query/src/request.rs | Added derive(Clone, Debug) to QueryRequest |
| Cargo.toml | Upgraded greptime-proto dependency version |
Collaborator
Author
|
proto change: GreptimeTeam/greptime-proto#234 |
2 tasks
36af996 to
9b1529b
Compare
evenyag
approved these changes
May 7, 2025
Contributor
|
Please merge the proto pr and change the proto ref in Cargo.toml, then this PR can be merged. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3c5f6fa to
e8f356a
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
add a "minimal sequence" in scan request to filter out some unwanted SST files, useful in our "leader-read" feature
PR Checklist
Please convert it to a draft if some of the following conditions are not met.