MXS-1944 Use time limited methods in rejoin
Uses switchover time limit, since the typical rejoin of a standalone server is somewhat similar to a switchover.
This commit is contained in:
@ -278,15 +278,6 @@ public:
|
||||
*/
|
||||
bool redirect_one_slave(const std::string& change_cmd);
|
||||
|
||||
/**
|
||||
* Joins this standalone server to the cluster.
|
||||
*
|
||||
* @param change_cmd Change master command
|
||||
* @param disable_server_events Should events be disabled on the server
|
||||
* @return True if commands were accepted by server
|
||||
*/
|
||||
bool join_cluster(const std::string& change_cmd, bool disable_server_events);
|
||||
|
||||
/**
|
||||
* Check if the server can be demoted by switchover.
|
||||
*
|
||||
@ -372,11 +363,11 @@ public:
|
||||
* Redirect the slave connection going to old master to replicate from new master.
|
||||
*
|
||||
* @param op Operation descriptor
|
||||
* @param old_master The connection to this server is redirected
|
||||
* @param old_conn The connection which is redirected
|
||||
* @param new_master The new master for the redirected connection
|
||||
* @return True on success
|
||||
*/
|
||||
bool redirect_existing_slave_conn(GeneralOpData& op, const MariaDBServer* old_master,
|
||||
bool redirect_existing_slave_conn(GeneralOpData& op, const SlaveStatus& old_conn,
|
||||
const MariaDBServer* new_master);
|
||||
|
||||
/**
|
||||
@ -395,6 +386,15 @@ public:
|
||||
bool copy_slave_conns(GeneralOpData& op, const SlaveStatusArray& conns_to_copy,
|
||||
const MariaDBServer* replacement);
|
||||
|
||||
/**
|
||||
* Create a new slave connection on the server and start it.
|
||||
*
|
||||
* @param op Operation descriptor
|
||||
* @param slave_conn Existing connection to emulate
|
||||
* @return True on success
|
||||
*/
|
||||
bool create_start_slave(GeneralOpData& op, const SlaveStatus& slave_conn);
|
||||
|
||||
/**
|
||||
* Is binary log on? 'update_replication_settings' should be ran before this function to query the data.
|
||||
*
|
||||
@ -545,6 +545,5 @@ private:
|
||||
|
||||
bool set_read_only(ReadOnlySetting value, maxbase::Duration time_limit, json_t** error_out);
|
||||
bool merge_slave_conns(GeneralOpData& op, const SlaveStatusArray& conns_to_merge);
|
||||
bool create_start_slave(GeneralOpData& op, const SlaveStatus& slave_conn);
|
||||
std::string generate_change_master_cmd(GeneralOpData& op, const SlaveStatus& slave_conn);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user