Slave heartbeat period is reported in diagnostics
Slave heartbeat period is reported in diagnostics only if router option is set
This commit is contained in:
@ -472,7 +472,7 @@ char task_name[BLRM_TASK_NAME_LEN+1] = "";
|
||||
}
|
||||
else if (strcmp(options[i], "send_slave_heartbeat") == 0)
|
||||
{
|
||||
inst->send_slave_heartbeat = atoi(value);
|
||||
inst->send_slave_heartbeat = config_truth_value(value);
|
||||
}
|
||||
else if (strcmp(options[i], "binlogdir") == 0)
|
||||
{
|
||||
@ -1242,8 +1242,9 @@ struct tm tm;
|
||||
dcb_printf(dcb,
|
||||
"\t\tNo. transitions to follow mode: %u\n",
|
||||
session->stats.n_bursts);
|
||||
dcb_printf(dcb, "\t\tHeartbeat period (seconds): %lu\n",
|
||||
session->heartbeat);
|
||||
if (router_inst->send_slave_heartbeat)
|
||||
dcb_printf(dcb, "\t\tHeartbeat period (seconds): %lu\n",
|
||||
session->heartbeat);
|
||||
|
||||
minno = session->stats.minno - 1;
|
||||
if (minno == -1)
|
||||
|
@ -1614,7 +1614,7 @@ int action;
|
||||
slave->lastEventReceived = hdr->event_type;
|
||||
|
||||
/* set lastReply */
|
||||
if (router->send_slave_heartbeat == 1)
|
||||
if (router->send_slave_heartbeat)
|
||||
slave->lastReply = time(0);
|
||||
|
||||
pkt = gwbuf_alloc(hdr->event_size + 5);
|
||||
|
@ -237,7 +237,7 @@ blr_slave_request(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
|
||||
|
||||
rc = blr_slave_binlog_dump(router, slave, queue);
|
||||
|
||||
if (router->send_slave_heartbeat == 1 && rc && slave->heartbeat > 0) {
|
||||
if (router->send_slave_heartbeat && rc && slave->heartbeat > 0) {
|
||||
snprintf(task_name, BLRM_TASK_NAME_LEN, "%s slaves heartbeat send", router->service->name);
|
||||
|
||||
/* Add slave heartbeat check task: it runs with 1 second frequency */
|
||||
|
Reference in New Issue
Block a user