为什么在MySQL单主组复制中将`Retrieved_Gtid_Set`设置为空

问题描述

我已经部署了单主组复制。我想确保我的副本数据与主数据库同步,这意味着我想找出可能落后于主数据库的秒数。我已运行e sql命令来查找组的状态,如:

MysqL> show slave status for channel 'group_replication_recovery'\G;
*************************** 1. row ***************************
               Slave_IO_State: 
                  Master_Host: <NULL>
                  Master_User: repl
                  Master_Port: 0
                Connect_Retry: 60
              Master_Log_File: 
          Read_Master_Log_Pos: 4
               Relay_Log_File: my-group-1-relay-bin-group_replication_recovery.000001
                Relay_Log_Pos: 4
        Relay_Master_Log_File: 
             Slave_IO_Running: No
            Slave_sql_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 0
              Relay_Log_Space: 506
              Until_Condition: sql_VIEW_ID
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: Yes
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_sql_Errno: 0
               Last_sql_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 0
                  Master_UUID: 
             Master_Info_File: MysqL.slave_master_info
                    sql_Delay: 0
          sql_Remaining_Delay: NULL
      Slave_sql_Running_State: 
           Master_Retry_Count: 1
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_sql_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 
            Executed_Gtid_Set: dc002fc3-c412-4d18-b1d4-66c1fbfbbc9b:1-22
                Auto_Position: 1
         Replicate_Rewrite_DB: 
                 Channel_Name: group_replication_recovery
           Master_TLS_Version: TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
       Master_public_key_path: 
        Get_master_public_key: 0
            Network_Namespace: 
1 row in set (0.00 sec)

从上面的输出中,有两个字段Retrieved_Gtid_SetExecuted_Gtid_Set。比较这些字段,我可以发现主数据库和副本数据库间的数据一致性/数据同步。但是Retrieved_Gtid_Set始终设置为空。有什么解决方法可以找出Retrieved_Gtid_Set吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)