MySQL multisource Replica, удаление фантомного канала репликации.

После миграции на новую версию остались артефакты старых реплик.

Поиск каналов репликации:

SELECT 
    channel_name AS Channel_Name,
    smi.host AS Master_Host,
    smi.user_name AS Master_User,
    smi.port AS Master_Port,
    smi.master_log_name AS Master_Log_File,
    smi.master_log_pos AS Read_Master_Log_Pos,
    ssi.master_log_pos AS Exec_Master_Log_Pos,
    rcs.service_state AS Slave_IO_Running,
    rss.service_state AS Slave_SQL_Running,
    t.processlist_time AS Seconds_Behind_Master,
    rcs.last_error_number AS Last_IO_Errno,
    rcs.last_error_message AS Last_IO_Error,
    rss.last_error_number AS Last_SQL_Errno,
    rss.last_error_message AS Last_SQL_Error,
    tc.processlist_state AS Slave_IO_State,
    t.processlist_state AS Slave_SQL_Running_State
FROM
    mysql.slave_master_info smi
        JOIN
    mysql.slave_relay_log_info ssi USING (channel_name)
        JOIN
    performance_schema.replication_connection_status rcs USING (channel_name)
        LEFT JOIN
    performance_schema.replication_applier_status_by_worker rss USING (channel_name)
        LEFT JOIN
    performance_schema.threads t ON (rss.thread_id = t.thread_id)
        LEFT JOIN
    performance_schema.threads tc ON (rcs.thread_id = tc.thread_id);

Артефакт реплики не имеет наименования, явно не доступен старый мастер сервер. Отключить командой:

    STOP REPLICA FOR CHANNEL "";
    RESET REPLICA ALL FOR CHANNEL "";

Теперь артефакт удалён.

Читать по теме:

https://dev.mysql.com/doc/refman/8.0/en/replication-multi-source-reset-replica.html

https://dev.mysql.com/doc/refman/8.0/en/replication-multi-source.html

ВАЖНО: начиная с 8.0.22 Master и Slave заменены на Source и Replica соответственно. Наименования в выводе SHOW REPLICA STATUS теперь содержат изменённые наименования.

Close Menu