refactor: propagate flush reasons through FlushRegions path#8051
Conversation
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a reason field to region flush requests to categorize the source of flushes, such as region migration, repartitioning, or remote WAL pruning. The changes span multiple components, including common-meta, datanode, meta-srv, and the mito2 engine, ensuring that the flush reason is propagated from the instruction level down to the storage engine. The PR also includes updates to tests and simplifies RegionFlushRequest instantiation using default values. Feedback suggests a minor simplification for assigning the flush reason in the metadata service utility functions.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
killme2008
left a comment
There was a problem hiding this comment.
Good job!
@WenyXu Please take a look.
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
Closes: #7586
What's changed and what's your intention?
This PR propagates flush reasons through the
FlushRegionspath, so metasrv-triggered flushes no longer fall back toManualon the datanode and mito2 side.It adds an optional reason to
FlushRegionsandRegionFlushRequest, propagates it through metasrv -> datanode -> mito2, and sets explicit reasons for region migration, repartition, and remote WAL prune flushes. Manual/user-triggered flush behavior remains unchanged, and legacyFlushRegionspayloads withoutreasonare still supported.PR Checklist
Please convert it to a draft if some of the following conditions are not met.