Closed evenyag closed 3 days ago
The pull request introduces several modifications across multiple files in the mito2
module. Key changes include enhancements to logging levels in twcs.rs
, the addition of new metrics in metrics.rs
, and the introduction of new structures and methods for range management in range.rs
. Other files, such as scan_region.rs
, scan_util.rs
, seq_scan.rs
, and unordered_scan.rs
, have been updated to incorporate the new RangeBuilderList
, improving the handling of range building during scanning operations. Overall, the changes focus on refining logging, enhancing metrics tracking, and improving range management.
File Path | Change Summary |
---|---|
src/mito2/src/compaction/twcs.rs |
Changed logging level from debug to trace in build_output method; adjusted logging statements for compaction. |
src/mito2/src/metrics.rs |
Added constant PARTITION_LABEL and static reference IN_PROGRESS_SCAN for tracking in-progress scans. |
src/mito2/src/read/range.rs |
Introduced FileRangeBuilder , MemRangeBuilder , and RangeBuilderList for managing file and memory ranges. |
src/mito2/src/read/scan_region.rs |
Removed unused imports and RangeBuilderList ; updated prune_memtable and prune_file methods for clarity. |
src/mito2/src/read/scan_util.rs |
Added in_progress_scan metric to PartitionMetricsInner ; updated scan_mem_ranges and scan_file_ranges methods. |
src/mito2/src/read/seq_scan.rs |
Updated methods to include range_builder_list for managing range building in scans. |
src/mito2/src/read/unordered_scan.rs |
Enhanced scan_partition_range and scan_partition_impl methods with range_builder_list for improved scanning. |
breaking-change
π In the forest where data flows,
A rabbit hops where the compaction grows.
With metrics bright, and ranges neat,
Scanning paths, oh what a treat!
Logs now trace the journey clear,
In the code, we hold so dear! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai summary
Attention: Patch coverage is 91.66667%
with 13 lines
in your changes missing coverage. Please review.
Project coverage is 83.79%. Comparing base (
42bf7e9
) to head (7a4f8f2
). Report is 17 commits behind head on main.
π¨ Try these New Features:
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
https://github.com/GreptimeTeam/greptimedb/issues/4828
What's changed and what's your intention?
This PR removes the scanner level global lock for range builders. Each partition will create a range builder for a file to prune. In UnorderedScan, each partition may prune the same file multiple times. But this usually doesn't increase the total query time.
The global lock may have potential issues while the query engine is doing something like streaming merge. Since partitions may wait for each other. If the top partition currently polling is waiting for a lock owned by another partition in the merge heap, then the top partition may never have a chance to get the lock.
Checklist
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Refactor
Chores