-
Notifications
You must be signed in to change notification settings - Fork 313
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
refactor: add region_dir
in CompactionRegion
#4187
Conversation
f00a7c4
to
1d57f2a
Compare
WalkthroughIn the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CompactionScheduler
participant AccessLayer
participant CompactionRegion
User ->> CompactionScheduler: Initiate compaction
CompactionScheduler ->> AccessLayer: Retrieve region_dir
AccessLayer -->> CompactionScheduler: region_dir value
CompactionScheduler ->> CompactionRegion: new(region_dir)
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
src/mito2/src/compaction/compactor.rs (1)
56-56
: Add documentation for the new fieldregion_dir
.The new field
region_dir
inCompactionRegion
should have a documentation comment to explain its purpose and usage, especially since it is a public field.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/mito2/src/compaction.rs (1 hunks)
- src/mito2/src/compaction/compactor.rs (2 hunks)
Additional comments not posted (1)
src/mito2/src/compaction.rs (1)
279-279
: Ensureregion_dir
is correctly derived fromaccess_layer
.The new field
region_dir
inCompactionRegion
is derived fromaccess_layer.region_dir().to_string()
. It's crucial to ensure thataccess_layer
always has a validregion_dir
before this assignment to prevent potential errors.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4187 +/- ##
==========================================
- Coverage 85.04% 84.80% -0.25%
==========================================
Files 1027 1028 +1
Lines 180210 180479 +269
==========================================
- Hits 153258 153049 -209
- Misses 26952 27430 +478 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
region_dir
in CompactionRegion.Checklist
Summary by CodeRabbit
region_dir
field to better manage region directories.