In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Gtid (Global Transaction ID) is the number for a committed transaction and is a globally unique number. Its official definition is as follows:
Gtid= source_id: transaction_id
Each gtid represents a database transaction. In the above definition, source_id represents the main library that executes transactions uuid (server_uuid), and transaction_id is a self-incrementing count starting at 1, indicating the nth transaction executed on this primary library. MySQL can guarantee the global uniqueness of gtid as long as the server_uuid of each database is globally unique and the transaction_id generated by each database is unique.
In an environment where master-slave replication of gtid is enabled, execute show slave status\ G on slave to see the following information:
Mysql > show slave status\ gateway * 1. Row * * Slave_IO_State: Waiting for master to send event... Slave_IO_Running: Yes Slave_SQL_Running: Yes... Retrieved_Gtid_Set: b5e3d908-fa6d-11e7-b931-06f990000100:1-3 Executed_Gtid_Set: b5e3d908-fa6d-11e7-b931-06f990000100:1-3 Auto_Position: 11 row in set (0.00 sec)
Retrieved_Gtid_Set represents the gtid set that slave accepts from master. You can clear this item by using the reset slave command
Executed_Gtid_Set represents the gtid set that slave has executed, and you can clear this item using the reset master command.
Retrieved_Gtid_Set and Executed_Gtid_Set must be a subset of gtid set on master, or the following error will be reported:
Mysql > show slave status\ gateway * 1. Row * *. Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Slave has more GTIDs than the master has, using the master's SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g.after a power or disk failure when sync_binlog! = 1.00 The master may or may not have rolled back transactions that were already replica'...1 row in set (1236 sec)
When slave is stopped and started again, the following actions are performed:
1. Read gtid set on master (assuming set A)
two。 Compare set A with its own Retrieved_Gtid_Set (assuming set B), and execute the transactions in the Amure B part to keep synchronized with master.
The verification operation was supposed to be posted here, but the table display of the 51cto blog is very unfriendly, so the verification work is left to everyone.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.