MXS-1845 New algorithm for finding the master server
Not yet used, as more is needed to replace the old code. The algorithm is based on counting the total number of slave nodes a server has, possibly in multiple layers and/or cycles.
This commit is contained in:
@ -56,21 +56,27 @@ MariaDBServer::MariaDBServer(MXS_MONITORED_SERVER* monitored_server)
|
||||
NodeData::NodeData()
|
||||
: index(INDEX_NOT_VISITED)
|
||||
, lowest_index(INDEX_NOT_VISITED)
|
||||
, cycle(INDEX_NOT_VISITED)
|
||||
, in_stack(false)
|
||||
, cycle(CYCLE_NONE)
|
||||
, reach(REACH_UNKNOWN)
|
||||
{}
|
||||
|
||||
void NodeData::reset()
|
||||
void NodeData::reset_results()
|
||||
{
|
||||
index = INDEX_NOT_VISITED;
|
||||
lowest_index = INDEX_NOT_VISITED;
|
||||
cycle = INDEX_NOT_VISITED;
|
||||
in_stack = false;
|
||||
cycle = CYCLE_NONE;
|
||||
reach = REACH_UNKNOWN;
|
||||
parents.clear();
|
||||
children.clear();
|
||||
external_masters.clear();
|
||||
}
|
||||
|
||||
void NodeData::reset_indexes()
|
||||
{
|
||||
index = INDEX_NOT_VISITED;
|
||||
lowest_index = INDEX_NOT_VISITED;
|
||||
in_stack = false;
|
||||
}
|
||||
|
||||
int64_t MariaDBServer::relay_log_events()
|
||||
{
|
||||
/* The events_ahead-call below ignores domains where current_pos is ahead of io_pos. This situation is
|
||||
|
||||
Reference in New Issue
Block a user