Skip to content
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

Merged
merged 4 commits into from
Mar 14, 2024
Merged

rework recovery #152

merged 4 commits into from
Mar 14, 2024

Conversation

JacksonYao287
Copy link
Collaborator

@JacksonYao287 JacksonYao287 commented Mar 6, 2024

recovery pg and shard after homestore is fully restarted

this io_uring problem is tracked in this issue

@JacksonYao287 JacksonYao287 self-assigned this Mar 6, 2024
@JacksonYao287 JacksonYao287 added this to the MileStone4.1 milestone Mar 6, 2024
@JacksonYao287 JacksonYao287 linked an issue Mar 6, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 75.36%. Comparing base (5f98b10) to head (8d7d0ab).

Files Patch % Lines
src/lib/homestore_backend/hs_pg_manager.cpp 75.00% 3 Missing and 1 partial ⚠️

❗ 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.
📢 Have feedback on the report? Share it here.

xiaoxichen
xiaoxichen previously approved these changes Mar 11, 2024
Copy link
Collaborator

@xiaoxichen xiaoxichen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -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});
Copy link
Collaborator

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?

Copy link
Collaborator Author

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?

Copy link
Collaborator

@xiaoxichen xiaoxichen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@JacksonYao287 JacksonYao287 merged commit 34f7a1a into eBay:main Mar 14, 2024
24 checks passed
@JacksonYao287 JacksonYao287 deleted the rework-recovery branch March 14, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rework the recovery of HO
3 participants