Commit 29d9897f authored by Daniel Black's avatar Daniel Black

MDEV-10272: add master host/port info to slave thread exit messages

Sample log error message generated:

2021-01-21  2:33:24 139912137520896 [Note] Slave SQL thread exiting, replication stopped in log 'master-bin.000001' at position 369
33:24 139912137520896 [Note] master was 127.0.0.1:16400
2021-01-21  2:33:24 139912137828096 [Note] Slave I/O thread exiting, read up to log 'master-bin.000001', position 369
2021-01-21  2:33:24 139912137828096 [Note] master was 127.0.0.1:16400

Based on work by Hartmut Holzgraefe.

Reviewer: knielsen@knielsen-hq.org, Andrei, Sachin
parent eb75e870
......@@ -4646,8 +4646,11 @@ log space");
err:
// print the current replication position
if (mi->using_gtid == Master_info::USE_GTID_NO)
{
sql_print_information("Slave I/O thread exiting, read up to log '%s', "
"position %llu", IO_RPL_LOG_NAME, mi->master_log_pos);
sql_print_information("master was %s:%d", mi->host, mi->port);
}
else
{
StringBuffer<100> tmp;
......@@ -4656,6 +4659,7 @@ log space");
"position %llu; GTID position %s",
IO_RPL_LOG_NAME, mi->master_log_pos,
tmp.c_ptr_safe());
sql_print_information("master was %s:%d", mi->host, mi->port);
}
RUN_HOOK(binlog_relay_io, thread_stop, (thd, mi));
thd->reset_query();
......@@ -5244,6 +5248,7 @@ pthread_handler_t handle_slave_sql(void *arg)
sql_print_information("Slave SQL thread exiting, replication stopped in "
"log '%s' at position %llu%s", RPL_LOG_NAME,
rli->group_master_log_pos, tmp.c_ptr_safe());
sql_print_information("master was %s:%d", mi->host, mi->port);
}
err_before_start:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment