1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-03 16:22:35 +03:00

* Return provider status from provider connect

* Call to get server status variables along with provider variables
* Deal with intermediate non-prims
This commit is contained in:
Teemu Ollakka
2018-06-27 15:36:52 +03:00
parent d659c6bebd
commit fd9cf87141
9 changed files with 171 additions and 35 deletions

View File

@ -500,25 +500,17 @@ wsrep::wsrep_provider_v26::~wsrep_provider_v26()
wsrep_unload(wsrep_);
}
int wsrep::wsrep_provider_v26::connect(
enum wsrep::provider::status wsrep::wsrep_provider_v26::connect(
const std::string& cluster_name,
const std::string& cluster_url,
const std::string& state_donor,
bool bootstrap)
{
int ret(0);
wsrep_status_t wret;
if ((wret = wsrep_->connect(wsrep_,
cluster_name.c_str(),
cluster_url.c_str(),
state_donor.c_str(),
bootstrap)) != WSREP_OK)
{
std::cerr << "Failed to connect cluster: "
<< wret << "\n";
ret = 1;
}
return ret;
return map_return_value(wsrep_->connect(wsrep_,
cluster_name.c_str(),
cluster_url.c_str(),
state_donor.c_str(),
bootstrap));
}
int wsrep::wsrep_provider_v26::disconnect()