MXS-2313: Pick best available master

Readwritesplit now picks the best available master if no open master
connection is available. This is required if the server rank is to be
taken into account when master selection is done.
This commit is contained in:
Markus Mäkelä
2019-03-08 08:57:51 +02:00
parent 8251389813
commit 9e9cd0c596
3 changed files with 26 additions and 27 deletions

View File

@ -391,7 +391,8 @@ static inline const char* failure_mode_to_str(enum failure_mode type)
void closed_session_reply(GWBUF* querybuf);
bool send_readonly_error(DCB* dcb);
mxs::RWBackend* get_root_master(const mxs::PRWBackends& backends);
mxs::RWBackend* get_root_master(const mxs::PRWBackends& backends, mxs::RWBackend* current_master,
const BackendSelectFunction& func);
/**
* Get total slave count and connected slave count