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

Replace member commit quorum #559

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

sanebay
Copy link
Contributor

@sanebay sanebay commented Sep 23, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 67.20%. Comparing base (1a0cef8) to head (f3a112b).
Report is 71 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/replication/repl_dev/raft_repl_dev.cpp 69.23% 4 Missing ⚠️
src/lib/replication/service/generic_repl_svc.cpp 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #559       +/-   ##
===========================================
+ Coverage   56.51%   67.20%   +10.68%     
===========================================
  Files         108      109        +1     
  Lines       10300    10461      +161     
  Branches     1402     1407        +5     
===========================================
+ Hits         5821     7030     +1209     
+ Misses       3894     2749     -1145     
- Partials      585      682       +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiaoxichen
Copy link
Collaborator

@sanebay lgtm , could you pls update the conan version?

return make_async_success<>();
});
});
}

void RaftReplDev::reset_quorum_size(uint32_t commit_quorum) {
Copy link
Contributor

@JacksonYao287 JacksonYao287 Sep 28, 2024

Choose a reason for hiding this comment

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

do we need add some check here to disable setting those quorum sizes without intersection, since it might cause data loss or log diverging.
pls see
https://github.com/eBay/NuRaft/blob/092997ab67eb2529c5b40556e1d301c8220c315d/docs/custom_quorum_size.md?plain=1#L29

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is used when we have double failure , e.g ( 2 out of 3 members are down )--- so for sure the number seems wrong.

We need other mechanism to shot on the head of other members , ensuring they are deadly dead.

Copy link
Contributor

Choose a reason for hiding this comment

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

when we make this config change, there might be some on-going write or delete, we need to carefully handle this quorum size change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to make these PG's read only as two nodes are down. Will check with CM, in nublocks once removed they are never added back to cluster.

@@ -165,6 +171,7 @@ AsyncReplResult<> RaftReplDev::replace_member(replica_id_t member_out_uuid, repl
auto err = m_state_machine->propose_to_raft(std::move(rreq));
if (err != ReplServiceError::OK) {
LOGERROR("Replace member propose to raft failed {}", err);
reset_quorum_size(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

we also need reset_quorum_size back to 0 in 152 and 132 before we return an error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack

@sanebay sanebay force-pushed the replace_member_commit_quorum branch 2 times, most recently from 4b09a0b to 740b732 Compare September 30, 2024 23:39
@sanebay sanebay force-pushed the replace_member_commit_quorum branch from 740b732 to f3a112b Compare October 1, 2024 02:38
@sanebay sanebay requested a review from yamingk October 1, 2024 19:29
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

@sanebay sanebay merged commit 5e6bf9d into eBay:master Oct 2, 2024
21 checks passed
@sanebay sanebay deleted the replace_member_commit_quorum branch October 2, 2024 16:14
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.

4 participants