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

feat: Implement an unordered scanner for append mode #3598

Merged
merged 8 commits into from
Mar 29, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Mar 27, 2024

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?

This PR implements a new scanner for append only regions.

  • Defines a ScanInput struct to keep fields required to build a scanner
  • Adds a new scanner UnorderedScan to scan all sources
    • The output ordering of UnorderedScan is unspecific
    • If scan_parallelism > 1, it scans sources in parallel
    • Otherwise, it scans sources one by one
  • Both UnorderedScan and SeqScan use ScanInput to construct sources
  • A region uses UnorderedScan for query if it is append only (append_mode = true)
    • It uses SeqScan if append_mode = false
  • Compaction still uses SeqScan

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 27, 2024
@evenyag evenyag requested review from fengjiachun and v0y4g3r March 27, 2024 13:43
@evenyag evenyag force-pushed the feat/unordered-scan branch from 16c2f8f to 09f5761 Compare March 27, 2024 13:44
@evenyag evenyag marked this pull request as ready for review March 27, 2024 13:44
@evenyag evenyag mentioned this pull request Mar 27, 2024
4 tasks
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/mito2/src/read/scan_region.rs Outdated Show resolved Hide resolved
src/mito2/src/read/unordered_scan.rs Outdated Show resolved Hide resolved
src/mito2/src/read/unordered_scan.rs Outdated Show resolved Hide resolved
@evenyag evenyag force-pushed the feat/unordered-scan branch from 09f5761 to 7760a96 Compare March 29, 2024 06:53
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 96.63212% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 85.06%. Comparing base (14267c2) to head (60902c7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3598      +/-   ##
==========================================
- Coverage   85.40%   85.06%   -0.34%     
==========================================
  Files         931      932       +1     
  Lines      154826   155045     +219     
==========================================
- Hits       132224   131894     -330     
- Misses      22602    23151     +549     

@v0y4g3r v0y4g3r self-requested a review March 29, 2024 07:12
Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@v0y4g3r v0y4g3r enabled auto-merge March 29, 2024 07:13
@v0y4g3r v0y4g3r added this pull request to the merge queue Mar 29, 2024
Merged via the queue into GreptimeTeam:main with commit ffbb132 Mar 29, 2024
19 checks passed
@v0y4g3r v0y4g3r deleted the feat/unordered-scan branch March 29, 2024 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants