Refactor auxiliary routing functions

Refactored some of the functions used to calculate servers. Removed
redundant checks and moved the ack_write() call to the right place.
This commit is contained in:
Markus Mäkelä
2017-06-15 20:30:11 +03:00
parent 1f31cfdfd7
commit b48bb4fc5e
3 changed files with 26 additions and 36 deletions

View File

@ -52,7 +52,7 @@ bool send_readonly_error(DCB *dcb);
*/
int router_handle_state_switch(DCB *dcb, DCB_REASON reason, void *data);
SRWBackend& get_bref_from_dcb(ROUTER_CLIENT_SES *rses, DCB *dcb);
int rses_get_max_slavecount(ROUTER_CLIENT_SES *rses, int router_nservers);
int rses_get_max_slavecount(ROUTER_CLIENT_SES *rses);
int rses_get_max_replication_lag(ROUTER_CLIENT_SES *rses);
/*