1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-15 15:41:49 +03:00

Extracted duplicate logic into return_from_donor_state

The condition to skip changing to `s_joined` for all codepaths
which return from donor state. Extracted the logic into separate
method.

Commented start_sst_action in mock_server_service.
This commit is contained in:
Teemu Ollakka
2023-02-28 16:20:18 +02:00
parent 5a943b66a7
commit 7843345a19
3 changed files with 24 additions and 20 deletions

View File

@ -173,15 +173,14 @@ namespace wsrep
{ return sst_before_init_; }
std::string sst_request() WSREP_OVERRIDE { return ""; }
std::function<int()> start_sst_action{};
// Action to take when start_sst() method is called.
// This can be overriden by test case to inject custom
// behavior.
std::function<int()> start_sst_action{[](){ return 0; }};
int start_sst(const std::string&, const wsrep::gtid&,
bool) WSREP_OVERRIDE
{
if (start_sst_action)
{
return start_sst_action();
}
return 0;
return start_sst_action();
}
void