-
Notifications
You must be signed in to change notification settings - Fork 16
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
rework recovery #152
rework recovery #152
Conversation
f34e952
to
8d7d0ab
Compare
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 #152 +/- ##
==========================================
- Coverage 75.56% 75.36% -0.21%
==========================================
Files 30 30
Lines 1326 1319 -7
Branches 139 137 -2
==========================================
- Hits 1002 994 -8
- Misses 244 245 +1
Partials 80 80 ☔ View full report in Codecov by Sentry. |
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
ff9621f
to
45e963d
Compare
@@ -162,6 +162,7 @@ TEST_F(ShardManagerTestingRecovery, ShardManagerRecovery) { | |||
_home_object.reset(); | |||
LOGI("restart home_object"); | |||
_home_object = homeobject::init_homeobject(std::weak_ptr< homeobject::HomeObjectApplication >(app)); | |||
std::this_thread::sleep_for(std::chrono::seconds{5}); |
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.
could we use pg->repl_dev_->get_leader_id()
to check in L190 and sleep if not the leader?
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.
I use 5s because the election_time_out is 3.2s. https://github.com/eBay/nuraft_mesg/blob/7e8cdeb261270642dac186902351da2174d7f077/src/lib/manager_impl.cpp#L25C1-L25C72
i want to refactor this two test case here , since they are much similiar and have a lot of duplicated logic as
TEST_F(HomeObjectFixture, SealShardWithRestart) { |
can we do this in a separate refactor PR?
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.
sure
recovery pg and shard after homestore is fully restarted
this io_uring problem is tracked in this issue