Fixed reference to LOGIF macro
Fixed reference to LOGIF macro
This commit is contained in:
@ -866,10 +866,9 @@ ROUTER_SLAVE *slave = (ROUTER_SLAVE *)router_session;
|
|||||||
atomic_add(&router->stats.n_registered, -1);
|
atomic_add(&router->stats.n_registered, -1);
|
||||||
|
|
||||||
if (slave->state > 0) {
|
if (slave->state > 0) {
|
||||||
LOGIF(LM, (skygw_log_write_flush(
|
MXS_NOTICE("%s: Slave %s:%d, server id %d, disconnected after %ld seconds. "
|
||||||
LOGFILE_MESSAGE,
|
"%d SQL commands, %d events sent (%lu bytes), binlog '%s', "
|
||||||
"%s: Slave %s:%d, server id %d, disconnected after %ld seconds. "
|
"last position %lu",
|
||||||
"%d SQL commands, %d events sent (%lu bytes), binlog '%s', last position %lu",
|
|
||||||
router->service->name, slave->dcb->remote, ntohs((slave->dcb->ipv4).sin_port),
|
router->service->name, slave->dcb->remote, ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
time(0) - slave->connect_time,
|
time(0) - slave->connect_time,
|
||||||
@ -877,7 +876,7 @@ ROUTER_SLAVE *slave = (ROUTER_SLAVE *)router_session;
|
|||||||
slave->stats.n_events,
|
slave->stats.n_events,
|
||||||
slave->stats.n_bytes,
|
slave->stats.n_bytes,
|
||||||
slave->binlogfile,
|
slave->binlogfile,
|
||||||
(unsigned long)slave->binlog_pos)));
|
(unsigned long)slave->binlog_pos);
|
||||||
} else {
|
} else {
|
||||||
MXS_NOTICE("%s: Slave %s, server id %d, disconnected after %ld seconds. "
|
MXS_NOTICE("%s: Slave %s, server id %d, disconnected after %ld seconds. "
|
||||||
"%d SQL commands",
|
"%d SQL commands",
|
||||||
|
|||||||
@ -425,8 +425,7 @@ struct stat statb;
|
|||||||
hdr->ok = SLAVE_POS_READ_OK;
|
hdr->ok = SLAVE_POS_READ_OK;
|
||||||
snprintf(errmsg, BINLOG_ERROR_MSG_LEN, "blr_read_binlog called with invalid file->fd, pos %lu", pos);
|
snprintf(errmsg, BINLOG_ERROR_MSG_LEN, "blr_read_binlog called with invalid file->fd, pos %lu", pos);
|
||||||
spinlock_release(&file->lock);
|
spinlock_release(&file->lock);
|
||||||
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
|
MXS_ERROR("Slave has failed fstat %s", errmsg);
|
||||||
"Slave has failed fstat %s", errmsg)));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -965,9 +964,8 @@ int fde_seen = 0;
|
|||||||
router->pending_transaction = 1;
|
router->pending_transaction = 1;
|
||||||
pending_transaction = 0;
|
pending_transaction = 0;
|
||||||
|
|
||||||
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
|
MXS_ERROR("Binlog '%s' ends at position %lu and has an incomplete transaction at %lu. ",
|
||||||
"Binlog '%s' ends at position %lu and has an incomplete transaction at %lu. ",
|
router->binlog_name, router->current_pos, router->binlog_position);
|
||||||
router->binlog_name, router->current_pos, router->binlog_position)));
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1792,13 +1792,11 @@ uint32_t chksum;
|
|||||||
|
|
||||||
slave->state = BLRS_DUMPING;
|
slave->state = BLRS_DUMPING;
|
||||||
|
|
||||||
LOGIF(LM, (skygw_log_write(
|
MXS_NOTICE("%s: Slave %s:%d, server id %d requested binlog file %s from position %lu",
|
||||||
LOGFILE_MESSAGE,
|
|
||||||
"%s: Slave %s:%d, server id %d requested binlog file %s from position %lu",
|
|
||||||
router->service->name, slave->dcb->remote,
|
router->service->name, slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile, (unsigned long)slave->binlog_pos)));
|
slave->binlogfile, (unsigned long)slave->binlog_pos);
|
||||||
|
|
||||||
if (slave->binlog_pos != router->binlog_position ||
|
if (slave->binlog_pos != router->binlog_position ||
|
||||||
strcmp(slave->binlogfile, router->binlog_name) != 0)
|
strcmp(slave->binlogfile, router->binlog_name) != 0)
|
||||||
@ -1934,11 +1932,10 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
poll_fake_write_event(slave->dcb);
|
poll_fake_write_event(slave->dcb);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
LOGIF(LE, (skygw_log_write(
|
MXS_ERROR("Slave %s:%i, server-id %d, binlog '%s': blr_slave_catchup "
|
||||||
LOGFILE_ERROR,
|
"failed to open binlog file",
|
||||||
"Slave %s:%i, server-id %d, binlog '%s': blr_slave_catchup failed to open binlog file",
|
|
||||||
slave->dcb->remote, ntohs((slave->dcb->ipv4).sin_port), slave->serverid,
|
slave->dcb->remote, ntohs((slave->dcb->ipv4).sin_port), slave->serverid,
|
||||||
slave->binlogfile)));
|
slave->binlogfile);
|
||||||
|
|
||||||
slave->cstate &= ~CS_BUSY;
|
slave->cstate &= ~CS_BUSY;
|
||||||
slave->state = BLRS_ERRORED;
|
slave->state = BLRS_ERRORED;
|
||||||
@ -1989,13 +1986,12 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
poll_fake_write_event(slave->dcb);
|
poll_fake_write_event(slave->dcb);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
LOGIF(LE, (skygw_log_write(
|
MXS_ERROR("Slave %s:%i, server-id %d, binlog '%s': blr_slave_catchup "
|
||||||
LOGFILE_ERROR,
|
"failed to open binlog file in rotate event",
|
||||||
"Slave %s:%i, server-id %d, binlog '%s': blr_slave_catchup failed to open binlog file in rotate event",
|
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile)));
|
slave->binlogfile);
|
||||||
|
|
||||||
slave->state = BLRS_ERRORED;
|
slave->state = BLRS_ERRORED;
|
||||||
|
|
||||||
@ -2029,13 +2025,13 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
slave->stats.n_failed_read++;
|
slave->stats.n_failed_read++;
|
||||||
|
|
||||||
if (hdr.ok == SLAVE_POS_READ_ERR) {
|
if (hdr.ok == SLAVE_POS_READ_ERR) {
|
||||||
LOGIF(LE, (skygw_log_write(LOGFILE_ERROR,
|
MXS_ERROR("%s Slave %s:%i, server-id %d, binlog '%s', %s",
|
||||||
"Slave %s:%i, server-id %d, binlog '%s', blr_read_binlog failure: %s",
|
router->service->name,
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile,
|
slave->binlogfile,
|
||||||
read_errmsg)));
|
read_errmsg);
|
||||||
|
|
||||||
spinlock_acquire(&slave->catch_lock);
|
spinlock_acquire(&slave->catch_lock);
|
||||||
|
|
||||||
@ -2063,14 +2059,13 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
|
|
||||||
spinlock_release(&router->lock);
|
spinlock_release(&router->lock);
|
||||||
|
|
||||||
LOGIF(LE, (skygw_log_write(LOGFILE_ERROR,
|
MXS_ERROR("%s: Slave %s:%i, server-id %d, binlog '%s', %s",
|
||||||
"%s: Slave %s:%i, server-id %d, binlog '%s', %s",
|
|
||||||
router->service->name,
|
router->service->name,
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile,
|
slave->binlogfile,
|
||||||
read_errmsg)));
|
read_errmsg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close the slave session and socket
|
* Close the slave session and socket
|
||||||
@ -2133,23 +2128,21 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
slave->stats.n_caughtup++;
|
slave->stats.n_caughtup++;
|
||||||
if (slave->stats.n_caughtup == 1)
|
if (slave->stats.n_caughtup == 1)
|
||||||
{
|
{
|
||||||
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE,
|
MXS_ERROR("%s: Slave %s:%d, server-id %d is now up to date '%s', position %lu.",
|
||||||
"%s: Slave %s:%d, server-id %d is now up to date '%s', position %lu.",
|
|
||||||
router->service->name,
|
router->service->name,
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile, (unsigned long)slave->binlog_pos)));
|
slave->binlogfile, (unsigned long)slave->binlog_pos);
|
||||||
}
|
}
|
||||||
else if ((slave->stats.n_caughtup % 50) == 0)
|
else if ((slave->stats.n_caughtup % 50) == 0)
|
||||||
{
|
{
|
||||||
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE,
|
MXS_ERROR("%s: Slave %s:%d, server-id %d is up to date '%s', position %lu.",
|
||||||
"%s: Slave %s:%d, server-id %d is up to date '%s', position %lu.",
|
|
||||||
router->service->name,
|
router->service->name,
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile, (unsigned long)slave->binlog_pos)));
|
slave->binlogfile, (unsigned long)slave->binlog_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2397,13 +2390,12 @@ char err_msg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
if ((record = blr_read_binlog(router, file, 4, &hdr, err_msg)) == NULL)
|
if ((record = blr_read_binlog(router, file, 4, &hdr, err_msg)) == NULL)
|
||||||
{
|
{
|
||||||
if (hdr.ok != SLAVE_POS_READ_OK) {
|
if (hdr.ok != SLAVE_POS_READ_OK) {
|
||||||
LOGIF(LE, (skygw_log_write(LOGFILE_ERROR,
|
MXS_ERROR("Slave %s:%i, server-id %d, binlog '%s', blr_read_binlog failure: %s",
|
||||||
"Slave %s:%i, server-id %d, binlog '%s', blr_read_binlog failure: %s",
|
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
ntohs((slave->dcb->ipv4).sin_port),
|
ntohs((slave->dcb->ipv4).sin_port),
|
||||||
slave->serverid,
|
slave->serverid,
|
||||||
slave->binlogfile,
|
slave->binlogfile,
|
||||||
err_msg)));
|
err_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
blr_close_binlog(router, file);
|
blr_close_binlog(router, file);
|
||||||
|
|||||||
Reference in New Issue
Block a user