MySQL Retrieved_gtid_set the number of transactions from the library is less than the number of Executed_gtid_set transactions

Source: Internet
Author: User

It's interesting to have a reboot today from library crash:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/66/wKioL1i_mtCxVs1ZAACva3alQtQ094.png-wh_500x0-wm_ 3-wmp_4-s_2369053148.png "title=" qq picture 20170308134631.png "alt=" Wkiol1i_mtcxvs1zaacva3alqtq094.png-wh_50 "/>

Can be found:

The Retrieved_gtid_set value shows that some transactions have not been received from the library and some transactions have been lost. However, from Executed_gtid_set, there is no loss of transaction from the library.

Error log:

2017-03-08 10:41:12 118393 [ERROR]/usr/local/mysql/bin/mysqld:sort aborted:query execution was interrupted
170308 10:55:38 mysqld_safe Number of processes running now:0
170308 10:55:38 Mysqld_safe mysqld restarted
2017-03-08 10:55:39 0 [Note]/usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as Process 131069 ...

As you can see, after MySQL crash is pulled up by Mysqld_safe, it should be that the IO Puma causes the database crash to restart. There is no bottleneck between the CPU and the remaining memory.

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/8E/66/wKioL1i_noLjjAs2AAHuVLvvSIc120.png-wh_500x0-wm_ 3-wmp_4-s_1587525033.png "title=" qq picture 20170308140226.png "alt=" Wkiol1i_noljjas2aahuvlvvsic120.png-wh_50 "/>

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8E/66/wKioL1i_n4LQ39pSAAJjzPhaReI532.png-wh_500x0-wm_ 3-wmp_4-s_565063618.png "style=" Float:none; "title=" QQ picture 20170308140544.png "alt=" Wkiol1i_ N4lq39psaajjzpharei532.png-wh_50 "/>

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8E/68/wKiom1i_n4SiOYUBAAND2QTfZ7M077.png-wh_500x0-wm_ 3-wmp_4-s_4188498218.png "style=" Float:none; "title=" QQ picture 20170308140634.png "alt=" Wkiom1i_ N4sioyubaand2qtfz7m077.png-wh_50 "/>

In order to confirm whether from the library is really because of less received transactions and missing part of the data, deliberately to parse the Binlog log from the library.

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8E/66/wKioL1i_oHXgyPtsAAH2DIV4518673.png-wh_500x0-wm_ 3-wmp_4-s_111627405.png "title=" qq picture 20170308141037.png "alt=" Wkiol1i_ohxgyptsaah2div4518673.png-wh_50 "/>

Can be found, in fact, from the library subsequent to receive the transaction number: 77d12988-29c1-11e6-a323-fa163ea5bbe1:334314693 transactions, but the order of the transaction number is disrupted, not in turn increments the situation.

This is the Binlog log record for the main library:

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/69/wKiom1i_pAvg26IBAAEC74IfoMI276.png-wh_500x0-wm_ 3-wmp_4-s_420463016.png "title=" qq picture 20170308142509.png "alt=" Wkiom1i_pavg26ibaaec74ifomi276.png-wh_50 "/>

Note: Because MySQL's master-slave data is consistent from the library must be strictly the same as the main library according to the same SQL order of execution, although the library also receives all the transactions and execution, but the master-slave library execution order is not consistent. Cautiously, there is still a risk of inconsistent data from the library. Need to use PT Toolkit to do data check for master and slave library data!


This article is from the "thick Product Thin Hair" blog, please make sure to keep this source http://1057212.blog.51cto.com/1047212/1904320

MySQL Retrieved_gtid_set the number of transactions from the library is less than the number of Executed_gtid_set transactions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.