|
It is reported by one of our customers that, same gtid is repeated many times in more than 30-40binary logs, causing the slave to hit with duplicate key error.
#210929 4:23:22 server id 1106988153 end_log_pos 989 CRC32 0x3eb40926 GTID 0-1106988153-7036556867 trans waited
[xxxxx:../log/binlog]# for i in
{000002..000047}
; do echo mysql-binlog.$i; ../bin/mysqlbinlog --no-defaults mysql-binlog.$i | grep -i "GTID 0-1106988153-7036556867" | cut -c80-150 | wc -l; done
mysql-binlog.000002
0
mysql-binlog.000003
105678
mysql-binlog.000004
102134
mysql-binlog.000005
48593
mysql-binlog.000006
61199
mysql-binlog.000007
83662
mysql-binlog.000008
88996
mysql-binlog.000009
59203
mysql-binlog.000010
68602
mysql-binlog.000011
75591
mysql-binlog.000012
75872
mysql-binlog.000013
75145
mysql-binlog.000014
75012
mysql-binlog.000015
71929
mysql-binlog.000016
69755
mysql-binlog.000017
72296
mysql-binlog.000018
72965
mysql-binlog.000019
74985
mysql-binlog.000020
74169
mysql-binlog.000021
75560
mysql-binlog.000022
68542
mysql-binlog.000023
69987
mysql-binlog.000024
71665
mysql-binlog.000025
68428
mysql-binlog.000026
72198
mysql-binlog.000027
74598
mysql-binlog.000028
70934
mysql-binlog.000029
76886
mysql-binlog.000030
72815
mysql-binlog.000031
77823
mysql-binlog.000032
81432
mysql-binlog.000033
80565
mysql-binlog.000034
82107
mysql-binlog.000035
86553
mysql-binlog.000036
87948
mysql-binlog.000037
89776
mysql-binlog.000038
91815
mysql-binlog.000039
91532
mysql-binlog.000040
85720
mysql-binlog.000041
88145
mysql-binlog.000042
90572
mysql-binlog.000043
93546
mysql-binlog.000044
93548
mysql-binlog.000045
94503
mysql-binlog.000046
66965
mysql-binlog.000047
5687
[db170035.ams101:/glide/mysqld/valmet_3401_ultra/log/binlog]#
Binlog Snippet:
=========
#210929 4:23:22 server id 1106988153 end_log_pos 90921 CRC32 0x784e6e3e GTID 0-1106988153-7036556867 trans waited
/Unable to render embedded object: File (100001 SET @@session.server_id=1106988153*//*) not found./;
/Unable to render embedded object: File (100001 SET @@session.gtid_seq_no=7036556867*//*) not found./;
BEGIN
/!/;
- at 90921
#210929 4:23:22 server id 1106988153 end_log_pos 91114 CRC32 0xdd1501a6 Query thread_id=519391 exec_time=3667273 error_code=0
SET TIMESTAMP=1632914602/!/;
SET @@session.sql_mode=1073741824/!/;
REPLACE INTO dddd.xxxxx(tablename, checkpoint) VALUES ('fffffff', '2021-09-29 11:21:14')
/!/;
#210929 4:23:22 server id 1106988153 end_log_pos 700530 CRC32 0xb8de549c GTID 0-1106988153-7036556867 trans waited
/Unable to render embedded object: File (100001 SET @@session.server_id=1106988153*//*) not found./;
/Unable to render embedded object: File (100001 SET @@session.gtid_seq_no=7036556867*//*) not found./;
BEGIN
/!/;
- at 700530
#210929 4:23:22 server id 1106988153 end_log_pos 700723 CRC32 0xce37d413 Query thread_id=519391 exec_time=3667273 error_code=0
SET TIMESTAMP=1632914602/!/;
SET @@session.sql_mode=1073741824/!/;
REPLACE INTO dddd.xxxxx(tablename, checkpoint) VALUES ('fffffff', '2021-09-29 11:21:14')
/!/;
A replication event of this GTID- " 0-1106988153-7036556867 " showing the "REPLACE ..." query and is logged at the timestamep of #210929 4:23:22 everytime in the binary logs.
So, we need to understand in which case this happens.
|