-
Notifications
You must be signed in to change notification settings - Fork 15
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
support spare replicas in raft test framework #226
support spare replicas in raft test framework #226
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #226 +/- ##
==========================================
+ Coverage 63.15% 65.20% +2.04%
==========================================
Files 32 32
Lines 1900 1911 +11
Branches 204 204
==========================================
+ Hits 1200 1246 +46
+ Misses 600 561 -39
- Partials 100 104 +4 ☔ View full report in Codecov by Sentry. |
074ec37
to
f520c3a
Compare
f520c3a
to
8ffa9a8
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.
in general LGTm
if (in_member_id == g_helper->my_replica_id()) { | ||
while (!am_i_in_pg(pg_id)) { | ||
std::this_thread::sleep_for(std::chrono::milliseconds(1000)); | ||
LOGINFO("new member is waiting to become a member of pg {}", pg_id); | ||
} | ||
|
||
wait_for_all(pg_shard_id_vec[pg_id].back() /*the last shard id in this pg*/, |
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.
as discussed, this doesnt guarantee to be right once baseline resync is on , it doesnt sync follow the LSN order.
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.
yes, but for now, we can not do this , since if a member is not leader , it can not get its own commit lsn
see
// replication_status can be empty in follower |
will implement a new wait_for_all as soon as we can get commit_lsn at follower
cc @sanebay
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.
OK, it makes sense to add self lsn to repl_service_ctx::get_raft_status()
.... When I implement this function I didnt realize we have this requirement./
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 PR aims to support spare replicas in raft test framework , which is essential for testing pg move. what`s more, a basic replace_member UT is added