-
Notifications
You must be signed in to change notification settings - Fork 298
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: introduce the region role #2640
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2640 +/- ##
===========================================
- Coverage 85.01% 84.61% -0.41%
===========================================
Files 739 740 +1
Lines 120141 120181 +40
===========================================
- Hits 102137 101690 -447
- Misses 18004 18491 +487 |
4fdfd8a
to
2a6d575
Compare
bedf68f
to
862ad71
Compare
From this point, how about defining region's role in a group of permission? Something like POSIX permission (but they have many differences). E.g.:
By doing this, we don't need to add extra conditions for file regions. And it's more flexible and straightforward. Like, to reduce WAL subscribe workload, we can have a region that only fetches data from S3 but is not aware of the newest WAL change. As well as the compactor only needs read/write permission to object-store (and update manifest, but this might need WAL write permission in the future). And this is closer to the underlying engine's permission implementation. |
862ad71
to
be4a115
Compare
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
This looks good, but we still need two completely separate roles to help metasrv easy to make better scheduling. |
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Introduce the region's role. Now, we only have two role:
The
RegionRole::Follower
: Readonly Region(mito2), Readonly Region(file).The
RegionRole::Leader
: Writable Region(mito2).Notes: We treat all File Region as
RegionRole::Follower
, even if it's the leader peer in the region routes.Checklist
Refer to a related PR or issue link (optional)
#2639