-
Notifications
You must be signed in to change notification settings - Fork 384
feat: flush leader region before downgrading #5995
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
Conversation
deb3daa
to
e6fe3fd
Compare
src/meta-srv/src/procedure/region_migration/flush_leader_region.rs
Outdated
Show resolved
Hide resolved
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
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.
Why not make the leader flushing inside downgrading it? That way you can avoid addition writes between flush and downgrade.
By flushing the leader region before downgrading it, we can minimize the time window where the region is not writable. |
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
This change helps the system handle region migration more smoothly. By flushing the leader region before downgrading it, we can:
Changes
FlushLeaderRegion
state in the region migration procedurePR Checklist
Please convert it to a draft if some of the following conditions are not met.