Merge branch '2.0' into develop-2.0-merge

This commit is contained in:
Markus Makela
2016-11-15 00:09:24 +02:00
26 changed files with 621 additions and 239 deletions

View File

@ -535,16 +535,9 @@ monitorMain(void *arg)
STRSRVSTATUS(ptr->server));
}
if (!(SERVER_IS_RUNNING(ptr->server)) ||
!(SERVER_IS_IN_CLUSTER(ptr->server)))
{
dcb_hangup_foreach(ptr->server);
}
if (SERVER_IS_DOWN(ptr->server))
{
/** Increase this server'e error count */
dcb_hangup_foreach(ptr->server);
ptr->mon_err_count += 1;
}
@ -650,6 +643,8 @@ monitorMain(void *arg)
}
ptr = ptr->next;
}
mon_hangup_failed_servers(mon);
}
}

View File

@ -596,15 +596,6 @@ monitorMain(void *arg)
/* monitor current node */
monitorDatabase(mon, ptr);
if (mon_status_changed(ptr))
{
if (!(SERVER_IS_RUNNING(ptr->server)) ||
!(SERVER_IS_IN_CLUSTER(ptr->server)))
{
dcb_hangup_foreach(ptr->server);
}
}
if (mon_status_changed(ptr) ||
mon_print_fail_status(ptr))
{
@ -676,6 +667,8 @@ monitorMain(void *arg)
}
ptr = ptr->next;
}
mon_hangup_failed_servers(mon);
}
}

View File

@ -1210,18 +1210,6 @@ monitorMain(void *arg)
ptr->server->name,
ptr->server->port);
}
/**
* Here we say: If the server's state changed
* so that it isn't running or some other way
* lost cluster membership, call call-back function
* of every DCB for which such callback was
* registered for this kind of issue (DCB_REASON_...)
*/
if (!(SERVER_IS_RUNNING(ptr->server)) ||
!(SERVER_IS_IN_CLUSTER(ptr->server)))
{
dcb_hangup_foreach(ptr->server);
}
}
if (mon_status_changed(ptr))
@ -1483,6 +1471,8 @@ monitorMain(void *arg)
ptr = ptr->next;
}
}
mon_hangup_failed_servers(mon);
} /*< while (1) */
}

View File

@ -444,6 +444,8 @@ monitorMain(void *arg)
}
ptr = ptr->next;
}
mon_hangup_failed_servers(mon);
}
}