PXC加入新节点避免SST时grastate.dat文件内容的修改问题

在主从同步完成并关闭实例后,需要修改grastate.dat中的seqno:到底应该填已经执行过最后的XID号(Executed_Gtid_Set:),还是,还是将从哪一个执行的XID号(Executed_Gtid_Set+1)?

分析结果:从以下操作看应该为从哪一个执行的XID号(Executed_Gtid_Set+1).比如:show master status的Executed_Gtid_Set是0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3363764,那应该填:3363765
  1. #vi grastate.dat
  2. # GALERA saved state
  3. version: 2.1
  4. uuid: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6
  5. seqno: ?????
  6. safe_to_bootstrap: 0

操作命令集:

  1. cd /3101/data/
  2. cp -r /data/backup/2018-08-18_01-42-32/* .
  3. chown -R mysql:mysql *
  4. \\注:my.cnf 为去掉pxc参数的配置文件,my_pxc.cnf是有PXC参数的配置文质
  5. /usr/local/pxc/bin/mysqld --defaults-file=/3101/my.cnf&
  6. mysql -S /3101/tmp/mysql.sock -pzstzst
  7. reset master;
  8. set global gtid_purged='0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3204367';
  9. change master to master_host='db210',master_port=3101,master_user='repl',master_password='repl4slave',master_auto_position=1;
  10. start slave;
  11. stop slave ;
  12. show slave status\G;
  13. Executed_Gtid_Set: 0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3363764
  14. reset slave all;
  15. root@localhost [(none)]>show master status;
  16. +------------------+----------+--------------+------------------+------------------------------------------------+
  17. | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
  18. +------------------+----------+--------------+------------------+------------------------------------------------+
  19. | mysql-bin.000001 | 73162918 | | | 0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3363764 |
  20. +------------------+----------+--------------+------------------+------------------------------------------------+
  21. 1 row in set (0.00 sec)
  22. p
  • 修改为已同步的XID号3363764,会提示:
  1. #vi grastate.dat
  2. # GALERA saved state
  3. version: 2.1
  4. uuid: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6
  5. seqno: 3363764
  6. safe_to_bootstrap: 0
  1. 关键信息:
  2. 2018-08-18T05:12:40.016791Z 0 [Note] WSREP: Receiving IST... 0.0% (0/1 events) complete.
  3. 2018-08-18T05:12:40.022637Z 2 [ERROR] Slave SQL: Could not execute Write_rows event on table wenyz.t2; Duplicate entry '4080231' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 173, Error_code: 1062
  4. 以下为全日志文件:
  5. 2018-08-18T05:12:37.007155Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
  6. 2018-08-18T05:12:37.007399Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  7. 2018-08-18T05:12:37.007467Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
  8. 2018-08-18T05:12:37.007505Z 0 [Note] /usr/local/pxc/bin/mysqld (mysqld 5.7.22-22-29.26-log) starting as process 13561 ...
  9. 2018-08-18T05:12:37.011276Z 0 [Note] WSREP: Setting wsrep_ready to false
  10. 2018-08-18T05:12:37.011296Z 0 [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization.
  11. 2018-08-18T05:12:37.011302Z 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/local/pxc/lib/libgalera_smm.so'
  12. 2018-08-18T05:12:37.016523Z 0 [Note] WSREP: wsrep_load(): Galera 3.26(r) by Codership Oy <info@codership.com> loaded successfully.
  13. 2018-08-18T05:12:37.016594Z 0 [Note] WSREP: CRC-32C: using hardware acceleration.
  14. 2018-08-18T05:12:37.017073Z 0 [Note] WSREP: Found saved state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363764, safe_to_bootstrap: 0
  15. 2018-08-18T05:12:37.033739Z 0 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363764
  16. 2018-08-18T05:12:37.034737Z 0 [Note] WSREP: Assign initial position for certification: 3363764, protocol version: -1
  17. 2018-08-18T05:12:37.034770Z 0 [Note] WSREP: Preparing to initiate SST/IST
  18. 2018-08-18T05:12:37.034775Z 0 [Note] WSREP: Starting replication
  19. 2018-08-18T05:12:37.034791Z 0 [Note] WSREP: Setting initial position to f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363764
  20. 2018-08-18T05:12:37.035054Z 0 [Note] WSREP: Using CRC-32C for message checksums.
  21. 2018-08-18T05:12:37.035171Z 0 [Note] WSREP: gcomm thread scheduling priority set to other:0
  22. 2018-08-18T05:12:37.035307Z 0 [Warning] WSREP: Fail to access the file (/3101/data//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
  23. 2018-08-18T05:12:37.035316Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
  24. 2018-08-18T05:12:37.035982Z 0 [Note] WSREP: GMCast version 0
  25. 2018-08-18T05:12:37.036299Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
  26. 2018-08-18T05:12:37.036308Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
  27. 2018-08-18T05:12:37.038548Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') connection established to 52637524 tcp://192.168.99.212:4567
  28. 2018-08-18T05:12:37.038571Z 0 [Warning] WSREP: (52637524, 'tcp://0.0.0.0:4567') address 'tcp://192.168.99.212:4567' points to own listening address, blacklisting
  29. 2018-08-18T05:12:37.038789Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') connection established to f5e9d0b5 tcp://192.168.99.210:4567
  30. 2018-08-18T05:12:37.038891Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:
  31. 2018-08-18T05:12:37.039074Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') connection established to 334d1dc3 tcp://192.168.99.211:4567
  32. 2018-08-18T05:12:37.538670Z 0 [Note] WSREP: declaring 334d1dc3 at tcp://192.168.99.211:4567 stable
  33. 2018-08-18T05:12:37.538705Z 0 [Note] WSREP: declaring f5e9d0b5 at tcp://192.168.99.210:4567 stable
  34. 2018-08-18T05:12:37.539056Z 0 [Note] WSREP: Node 334d1dc3 state primary
  35. 2018-08-18T05:12:37.539426Z 0 [Note] WSREP: Current view of cluster as seen by this node
  36. view (view_id(PRIM,334d1dc3,27)
  37. memb {
  38. 334d1dc3,0
  39. 52637524,0
  40. f5e9d0b5,0
  41. }
  42. joined {
  43. }
  44. left {
  45. }
  46. )
  47. 2018-08-18T05:12:37.539444Z 0 [Note] WSREP: Save the discovered primary-component to disk
  48. 2018-08-18T05:12:38.037701Z 0 [Note] WSREP: gcomm: connected
  49. 2018-08-18T05:12:38.037800Z 0 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
  50. 2018-08-18T05:12:38.037969Z 0 [Note] WSREP: Waiting for SST/IST to complete.
  51. 2018-08-18T05:12:38.037973Z 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 3
  52. 2018-08-18T05:12:38.038003Z 0 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
  53. 2018-08-18T05:12:38.038072Z 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 709b1607-a2a5-11e8-bf12-4fc225cb1a6b
  54. 2018-08-18T05:12:38.038082Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 709b1607-a2a5-11e8-bf12-4fc225cb1a6b from 0 (db211)
  55. 2018-08-18T05:12:38.038089Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 709b1607-a2a5-11e8-bf12-4fc225cb1a6b from 2 (db210)
  56. 2018-08-18T05:12:38.038492Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 709b1607-a2a5-11e8-bf12-4fc225cb1a6b from 1 (db212)
  57. 2018-08-18T05:12:38.038503Z 0 [Note] WSREP: Quorum results:
  58. version = 4,
  59. component = PRIMARY,
  60. conf_id = 26,
  61. members = 2/3 (primary/total),
  62. act_id = 3363765,
  63. last_appl. = -1,
  64. protocols = 0/8/3 (gcs/repl/appl),
  65. group UUID = f5ea51e1-a1d0-11e8-b9c7-43286b421cc6
  66. 2018-08-18T05:12:38.038510Z 0 [Note] WSREP: Flow-control interval: [173, 173]
  67. 2018-08-18T05:12:38.038513Z 0 [Note] WSREP: Trying to continue unpaused monitor
  68. 2018-08-18T05:12:38.038518Z 0 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 3363765)
  69. 2018-08-18T05:12:38.038584Z 2 [Note] WSREP: State transfer required:
  70. Group state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  71. Local state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363764
  72. 2018-08-18T05:12:38.038605Z 2 [Note] WSREP: REPL Protocols: 8 (3, 2)
  73. 2018-08-18T05:12:38.038617Z 2 [Note] WSREP: New cluster view: global state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765, view# 27: Primary, number of nodes: 3, my index: 1, protocol version 3
  74. 2018-08-18T05:12:38.038620Z 2 [Note] WSREP: Setting wsrep_ready to true
  75. 2018-08-18T05:12:38.038623Z 2 [Warning] WSREP: Gap in state sequence. Need state transfer.
  76. 2018-08-18T05:12:38.038626Z 2 [Note] WSREP: Setting wsrep_ready to false
  77. 2018-08-18T05:12:38.548564Z 2 [Note] WSREP: Prepared SST/IST request: xtrabackup-v2|192.168.99.212:4588/xtrabackup_sst//1
  78. 2018-08-18T05:12:38.548592Z 2 [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: 1 -> 2) (Increment: 1 -> 3)
  79. 2018-08-18T05:12:38.548612Z 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
  80. 2018-08-18T05:12:38.548633Z 2 [Note] WSREP: Assign initial position for certification: 3363765, protocol version: 3
  81. 2018-08-18T05:12:38.548690Z 0 [Note] WSREP: Service thread queue flushed.
  82. 2018-08-18T05:12:38.548733Z 2 [Note] WSREP: Check if state gap can be serviced using IST
  83. 2018-08-18T05:12:38.548853Z 2 [Note] WSREP: IST receiver addr using tcp://192.168.99.212:4568
  84. 2018-08-18T05:12:38.549017Z 2 [Note] WSREP: Prepared IST receiver, listening at: tcp://192.168.99.212:4568
  85. 2018-08-18T05:12:38.549038Z 2 [Note] WSREP: State gap can be likely serviced using IST. SST request though present would be void.
  86. 2018-08-18T05:12:38.549436Z 0 [Note] WSREP: Member 1.0 (db212) requested state transfer from '*any*'. Selected 2.0 (db210)(SYNCED) as donor.
  87. 2018-08-18T05:12:38.549451Z 0 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 3363765)
  88. 2018-08-18T05:12:38.549489Z 2 [Note] WSREP: Requesting state transfer: success, donor: 2
  89. 2018-08-18T05:12:38.549504Z 2 [Note] WSREP: GCache history reset: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:0 -> f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  90. 2018-08-18T05:12:38.881221Z 0 [Note] WSREP: 2.0 (db210): State transfer to 1.0 (db212) complete.
  91. 2018-08-18T05:12:38.881584Z 0 [Note] WSREP: Member 2.0 (db210) synced with group.
  92. 2018-08-18T05:12:38.900497Z WSREP_SST: [INFO] xtrabackup_ist received from donor: Running IST
  93. 2018-08-18T05:12:38.902699Z WSREP_SST: [INFO] Galera co-ords from recovery: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363764
  94. 2018-08-18T05:12:38.914099Z 0 [Note] WSREP: SST complete, seqno: 3363764
  95. 2018-08-18T05:12:38.916064Z 0 [Note] InnoDB: PUNCH HOLE support available
  96. 2018-08-18T05:12:38.916075Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  97. 2018-08-18T05:12:38.916079Z 0 [Note] InnoDB: Uses event mutexes
  98. 2018-08-18T05:12:38.916083Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
  99. 2018-08-18T05:12:38.916087Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
  100. 2018-08-18T05:12:38.916090Z 0 [Note] InnoDB: Using Linux native AIO
  101. 2018-08-18T05:12:38.916354Z 0 [Note] InnoDB: Number of pools: 1
  102. 2018-08-18T05:12:38.916489Z 0 [Note] InnoDB: Using CPU crc32 instructions
  103. 2018-08-18T05:12:38.918710Z 0 [Note] InnoDB: Initializing buffer pool, total size = 5G, instances = 1, chunk size = 128M
  104. 2018-08-18T05:12:39.097918Z 0 [Note] InnoDB: Completed initialization of buffer pool
  105. 2018-08-18T05:12:39.142187Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
  106. 2018-08-18T05:12:39.178972Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /data/pxc/mysql3101/data/xb_doublewrite
  107. 2018-08-18T05:12:39.180706Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
  108. 2018-08-18T05:12:39.247496Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /data/pxc/mysql3101/data/xb_doublewrite, size 3932160 bytes
  109. 2018-08-18T05:12:39.382191Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
  110. 2018-08-18T05:12:39.382307Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
  111. 2018-08-18T05:12:39.413135Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
  112. 2018-08-18T05:12:39.414495Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
  113. 2018-08-18T05:12:39.414508Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
  114. 2018-08-18T05:12:39.414864Z 0 [Note] InnoDB: Waiting for purge to start
  115. 2018-08-18T05:12:39.465228Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.22-rel22 started; log sequence number 1767442014
  116. 2018-08-18T05:12:39.465388Z 0 [Note] InnoDB: Loading buffer pool(s) from /data/pxc/mysql3101/data/ib_buffer_pool
  117. 2018-08-18T05:12:39.465986Z 0 [Note] Plugin 'FEDERATED' is disabled.
  118. 2018-08-18T05:12:39.990734Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
  119. 2018-08-18T05:12:39.990761Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
  120. 2018-08-18T05:12:39.991586Z 0 [Warning] CA certificate ca.pem is self signed.
  121. 2018-08-18T05:12:39.991651Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
  122. 2018-08-18T05:12:39.991785Z 0 [Note] Server hostname (bind-address): '*'; port: 3101
  123. 2018-08-18T05:12:39.991842Z 0 [Note] IPv6 is available.
  124. 2018-08-18T05:12:39.991859Z 0 [Note] - '::' resolves to '::';
  125. 2018-08-18T05:12:39.991898Z 0 [Note] Server socket created on IP: '::'.
  126. 2018-08-18T05:12:40.002996Z 0 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=db212-relay-bin' to avoid this problem.
  127. 2018-08-18T05:12:40.007070Z 0 [Warning] Recovery from master pos 226323000 and file mysql-bin.000006 for channel ''. Previous relay log pos and relay log file had been set to 76670171, ./db212-relay-bin.000002 respectively.
  128. 2018-08-18T05:12:40.014932Z 0 [Note] Event Scheduler: Loaded 0 events
  129. 2018-08-18T05:12:40.015044Z 0 [Note] WSREP: Signalling provider to continue on SST completion.
  130. 2018-08-18T05:12:40.016564Z 0 [Note] WSREP: Initialized wsrep sidno 2
  131. 2018-08-18T05:12:40.016594Z 0 [Note] WSREP: SST received: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363764
  132. 2018-08-18T05:12:40.016670Z 2 [Note] WSREP: Receiving IST: 1 writesets, seqnos 3363764-3363765
  133. 2018-08-18T05:12:40.016694Z 0 [Note] /usr/local/pxc/bin/mysqld: ready for connections.
  134. Version: '5.7.22-22-29.26-log' socket: '/3101/tmp/mysql.sock' port: 3101 Percona XtraDB Cluster binary (GPL) 5.7.22-29.26, Revision da86071, wsrep_29.26
  135. 2018-08-18T05:12:40.016791Z 0 [Note] WSREP: Receiving IST... 0.0% (0/1 events) complete.
  136. 2018-08-18T05:12:40.022637Z 2 [ERROR] Slave SQL: Could not execute Write_rows event on table wenyz.t2; Duplicate entry '4080231' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 173, Error_code: 1062
  137. 2018-08-18T05:12:40.022652Z 2 [Warning] WSREP: RBR event 3 Write_rows apply warning: 121, 3363765
  138. 2018-08-18T05:12:40.022805Z 2 [Note] WSREP: Applier statement rollback needed
  139. 2018-08-18T05:12:40.022834Z 2 [Warning] WSREP: Failed to apply app buffer: seqno: 3363765, status: 1
  140. at galera/src/trx_handle.cpp:apply():351
  141. Retrying 2th time
  142. 2018-08-18T05:12:40.022943Z 2 [ERROR] Slave SQL: Could not execute Write_rows event on table wenyz.t2; Duplicate entry '4080231' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 173, Error_code: 1062
  143. 2018-08-18T05:12:40.022955Z 2 [Warning] WSREP: RBR event 3 Write_rows apply warning: 121, 3363765
  144. 2018-08-18T05:12:40.023065Z 2 [Note] WSREP: Applier statement rollback needed
  145. 2018-08-18T05:12:40.023091Z 2 [Warning] WSREP: Failed to apply app buffer: seqno: 3363765, status: 1
  146. at galera/src/trx_handle.cpp:apply():351
  147. Retrying 3th time
  148. 2018-08-18T05:12:40.023168Z 2 [ERROR] Slave SQL: Could not execute Write_rows event on table wenyz.t2; Duplicate entry '4080231' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 173, Error_code: 1062
  149. 2018-08-18T05:12:40.023175Z 2 [Warning] WSREP: RBR event 3 Write_rows apply warning: 121, 3363765
  150. 2018-08-18T05:12:40.023829Z 2 [Note] WSREP: Applier statement rollback needed
  151. 2018-08-18T05:12:40.023854Z 2 [Warning] WSREP: Failed to apply app buffer: seqno: 3363765, status: 1
  152. at galera/src/trx_handle.cpp:apply():351
  153. Retrying 4th time
  154. 2018-08-18T05:12:40.023945Z 2 [ERROR] Slave SQL: Could not execute Write_rows event on table wenyz.t2; Duplicate entry '4080231' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 173, Error_code: 1062
  155. 2018-08-18T05:12:40.023963Z 2 [Warning] WSREP: RBR event 3 Write_rows apply warning: 121, 3363765
  156. 2018-08-18T05:12:40.024520Z 2 [Note] WSREP: Applier statement rollback needed
  157. 2018-08-18T05:12:40.024569Z 2 [ERROR] WSREP: receiving IST failed, node restart required: Failed to apply trx 3363765 4 times
  158. 2018-08-18T05:12:40.024583Z 2 [ERROR] WSREP: failed trx: source: f5e9d0b5-a1d0-11e8-a8ab-fb9117856933 version: 3 local: 0 state: APPLYING flags: 257 conn_id: 461 trx_id: 3365041 seqnos (l: -1, g: 3363765, s: 3363764, d: 3363764, ts: 1008762593706070)
  159. 2018-08-18T05:12:40.538080Z 0 [Note] WSREP: (52637524, 'tcp://0.0.0.0:4567') turning message relay requesting off
  160. 2018-08-18T05:12:40.731840Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180818 13:12:40
  • 实例启来了,但状态不对(wsrep_local_state=1):
  1. root@localhost [(none)]>show master status;
  2. +------------------+----------+--------------+------------------+------------------------------------------------+
  3. | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
  4. +------------------+----------+--------------+------------------+------------------------------------------------+
  5. | mysql-bin.000002 | 194 | | | 0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3363764 |
  6. +------------------+----------+--------------+------------------+------------------------------------------------+
  7. 1 row in set (0.00 sec)
  8. root@localhost [(none)]>show global status like '%wsrep%';
  9. +----------------------------------+-------------------------------------------------------------+
  10. | Variable_name | Value |
  11. +----------------------------------+-------------------------------------------------------------+
  12. | wsrep_local_state_uuid | f5ea51e1-a1d0-11e8-b9c7-43286b421cc6 |
  13. | wsrep_protocol_version | 8 |
  14. | wsrep_last_applied | 3363764 |
  15. | wsrep_last_committed | 3363764 |
  16. | wsrep_replicated | 0 |
  17. | wsrep_replicated_bytes | 0 |
  18. | wsrep_repl_keys | 0 |
  19. | wsrep_repl_keys_bytes | 0 |
  20. | wsrep_repl_data_bytes | 0 |
  21. | wsrep_repl_other_bytes | 0 |
  22. | wsrep_received | 1 |
  23. | wsrep_received_bytes | 277 |
  24. | wsrep_local_commits | 0 |
  25. | wsrep_local_cert_failures | 0 |
  26. | wsrep_local_replays | 0 |
  27. | wsrep_local_send_queue | 0 |
  28. | wsrep_local_send_queue_max | 1 |
  29. | wsrep_local_send_queue_min | 0 |
  30. | wsrep_local_send_queue_avg | 0.000000 |
  31. | wsrep_local_recv_queue | 0 |
  32. | wsrep_local_recv_queue_max | 1 |
  33. | wsrep_local_recv_queue_min | 0 |
  34. | wsrep_local_recv_queue_avg | 0.000000 |
  35. | wsrep_local_cached_downto | 0 |
  36. | wsrep_flow_control_paused_ns | 0 |
  37. | wsrep_flow_control_paused | 0.000000 |
  38. | wsrep_flow_control_sent | 0 |
  39. | wsrep_flow_control_recv | 0 |
  40. | wsrep_flow_control_interval | [ 173, 173 ] |
  41. | wsrep_flow_control_interval_low | 173 |
  42. | wsrep_flow_control_interval_high | 173 |
  43. | wsrep_flow_control_status | OFF |
  44. | wsrep_cert_deps_distance | 0.000000 |
  45. | wsrep_apply_oooe | 0.000000 |
  46. | wsrep_apply_oool | 0.000000 |
  47. | wsrep_apply_window | 1.000000 |
  48. | wsrep_commit_oooe | 0.000000 |
  49. | wsrep_commit_oool | 0.000000 |
  50. | wsrep_commit_window | 0.000000 |
  51. | wsrep_local_state | 1 |
  52. | wsrep_local_state_comment | Joining: receiving State Transfer |
  53. | wsrep_cert_index_size | 0 |
  54. | wsrep_cert_bucket_count | 22 |
  55. | wsrep_gcache_pool_size | 1536 |
  56. | wsrep_causal_reads | 0 |
  57. | wsrep_cert_interval | 0.000000 |
  58. | wsrep_ist_receive_status | 100% complete, received seqno 3363765 of 3363765-3363765 |
  59. | wsrep_ist_receive_seqno_start | 3363765 |
  60. | wsrep_ist_receive_seqno_current | 3363765 |
  61. | wsrep_ist_receive_seqno_end | 3363765 |
  62. | wsrep_incoming_addresses | 192.168.99.211:3101,192.168.99.212:3101,192.168.99.210:3101 |
  63. | wsrep_desync_count | 0 |
  64. | wsrep_evs_delayed | |
  65. | wsrep_evs_evict_list | |
  66. | wsrep_evs_repl_latency | 0/0/0/0/0 |
  67. | wsrep_evs_state | OPERATIONAL |
  68. | wsrep_gcomm_uuid | 52637524-a2a5-11e8-9202-5e6bd08af1e3 |
  69. | wsrep_cluster_conf_id | 27 |
  70. | wsrep_cluster_size | 3 |
  71. | wsrep_cluster_state_uuid | f5ea51e1-a1d0-11e8-b9c7-43286b421cc6 |
  72. | wsrep_cluster_status | Primary |
  73. | wsrep_connected | ON |
  74. | wsrep_local_bf_aborts | 0 |
  75. | wsrep_local_index | 1 |
  76. | wsrep_provider_name | Galera |
  77. | wsrep_provider_vendor | Codership Oy <info@codership.com> |
  78. | wsrep_provider_version | 3.26(r) |
  79. | wsrep_ready | OFF |
  80. +----------------------------------+-------------------------------------------------------------+
  81. 68 rows in set (0.01 sec)

修改为GTID+1的XID(3363765)的执行情况

  1. [root@db212_15:53:31 /3101/data]
  2. #cat grastate.dat
  3. # GALERA saved state
  4. version: 2.1
  5. uuid: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6
  6. seqno: 3363765
  7. safe_to_bootstrap: 0
  • error.log
  1. #vi error.log
  2. 2018-08-18T08:11:19.233282Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
  3. 2018-08-18T08:11:19.233530Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  4. 2018-08-18T08:11:19.233598Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
  5. 2018-08-18T08:11:19.233637Z 0 [Note] /usr/local/pxc/bin/mysqld (mysqld 5.7.22-22-29.26-log) starting as process 14354 ...
  6. 2018-08-18T08:11:19.237530Z 0 [Note] WSREP: Setting wsrep_ready to false
  7. 2018-08-18T08:11:19.237549Z 0 [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization.
  8. 2018-08-18T08:11:19.237555Z 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/local/pxc/lib/libgalera_smm.so'
  9. 2018-08-18T08:11:19.242964Z 0 [Note] WSREP: wsrep_load(): Galera 3.26(r) by Codership Oy <info@codership.com> loaded successfully.
  10. 2018-08-18T08:11:19.243040Z 0 [Note] WSREP: CRC-32C: using hardware acceleration.
  11. 2018-08-18T08:11:19.243521Z 0 [Note] WSREP: Found saved state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765, safe_to_bootstrap: 0
  12. 2018-08-18T08:11:19.261079Z 0 [Note] WSREP: GCache history reset: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:0 -> f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  13. 2018-08-18T08:11:19.261575Z 0 [Note] WSREP: Assign initial position for certification: 3363765, protocol version: -1
  14. 2018-08-18T08:11:19.261594Z 0 [Note] WSREP: Preparing to initiate SST/IST
  15. 2018-08-18T08:11:19.261598Z 0 [Note] WSREP: Starting replication
  16. 2018-08-18T08:11:19.261612Z 0 [Note] WSREP: Setting initial position to f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  17. 2018-08-18T08:11:19.261802Z 0 [Note] WSREP: Using CRC-32C for message checksums.
  18. 2018-08-18T08:11:19.261905Z 0 [Note] WSREP: gcomm thread scheduling priority set to other:0
  19. 2018-08-18T08:11:19.262020Z 0 [Warning] WSREP: Fail to access the file (/3101/data//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
  20. 2018-08-18T08:11:19.262028Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
  21. 2018-08-18T08:11:19.262665Z 0 [Note] WSREP: GMCast version 0
  22. 2018-08-18T08:11:19.262992Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
  23. 2018-08-18T08:11:19.263006Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
  24. 2018-08-18T08:11:19.264937Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') connection established to 495569ff tcp://192.168.99.212:4567
  25. 2018-08-18T08:11:19.264958Z 0 [Warning] WSREP: (495569ff, 'tcp://0.0.0.0:4567') address 'tcp://192.168.99.212:4567' points to own listening address, blacklisting
  26. 2018-08-18T08:11:19.265358Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') connection established to 334d1dc3 tcp://192.168.99.211:4567
  27. 2018-08-18T08:11:19.265456Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:
  28. 2018-08-18T08:11:19.265484Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') connection established to f5e9d0b5 tcp://192.168.99.210:4567
  29. 2018-08-18T08:11:19.764859Z 0 [Note] WSREP: declaring 334d1dc3 at tcp://192.168.99.211:4567 stable
  30. 2018-08-18T08:11:19.764897Z 0 [Note] WSREP: declaring f5e9d0b5 at tcp://192.168.99.210:4567 stable
  31. 2018-08-18T08:11:19.765236Z 0 [Note] WSREP: Node 334d1dc3 state primary
  32. 2018-08-18T08:11:19.765538Z 0 [Note] WSREP: Current view of cluster as seen by this node
  33. view (view_id(PRIM,334d1dc3,31)
  34. memb {
  35. 334d1dc3,0
  36. 495569ff,0
  37. f5e9d0b5,0
  38. }
  39. joined {
  40. }
  41. left {
  42. }
  43. )
  44. 2018-08-18T08:11:19.765550Z 0 [Note] WSREP: Save the discovered primary-component to disk
  45. 2018-08-18T08:11:20.264288Z 0 [Note] WSREP: gcomm: connected
  46. 2018-08-18T08:11:20.264384Z 0 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
  47. 2018-08-18T08:11:20.264519Z 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 3
  48. 2018-08-18T08:11:20.264589Z 0 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
  49. 2018-08-18T08:11:20.264590Z 0 [Note] WSREP: Waiting for SST/IST to complete.
  50. 2018-08-18T08:11:20.264625Z 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 67952d95-a2be-11e8-81ed-abb61082a544
  51. 2018-08-18T08:11:20.264634Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 67952d95-a2be-11e8-81ed-abb61082a544 from 0 (db211)
  52. 2018-08-18T08:11:20.264640Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 67952d95-a2be-11e8-81ed-abb61082a544 from 2 (db210)
  53. 2018-08-18T08:11:20.265036Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 67952d95-a2be-11e8-81ed-abb61082a544 from 1 (db212)
  54. 2018-08-18T08:11:20.265056Z 0 [Note] WSREP: Quorum results:
  55. version = 4,
  56. component = PRIMARY,
  57. conf_id = 30,
  58. members = 2/3 (primary/total),
  59. act_id = 3443542,
  60. last_appl. = -1,
  61. protocols = 0/8/3 (gcs/repl/appl),
  62. group UUID = f5ea51e1-a1d0-11e8-b9c7-43286b421cc6
  63. 2018-08-18T08:11:20.265063Z 0 [Note] WSREP: Flow-control interval: [173, 173]
  64. 2018-08-18T08:11:20.265066Z 0 [Note] WSREP: Trying to continue unpaused monitor
  65. 2018-08-18T08:11:20.265071Z 0 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 3443542)
  66. 2018-08-18T08:11:20.265135Z 1 [Note] WSREP: State transfer required:
  67. Group state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3443542
  68. Local state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  69. 2018-08-18T08:11:20.265155Z 1 [Note] WSREP: REPL Protocols: 8 (3, 2)
  70. 2018-08-18T08:11:20.265166Z 1 [Note] WSREP: New cluster view: global state: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3443542, view# 31: Primary, number of nodes: 3, my index: 1, protocol version 3
  71. 2018-08-18T08:11:20.265170Z 1 [Note] WSREP: Setting wsrep_ready to true
  72. 2018-08-18T08:11:20.265173Z 1 [Warning] WSREP: Gap in state sequence. Need state transfer.
  73. 2018-08-18T08:11:20.265175Z 1 [Note] WSREP: Setting wsrep_ready to false
  74. 2018-08-18T08:11:20.777717Z 1 [Note] WSREP: Prepared SST/IST request: xtrabackup-v2|192.168.99.212:4588/xtrabackup_sst//1
  75. 2018-08-18T08:11:20.777738Z 1 [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: 1 -> 2) (Increment: 1 -> 3)
  76. 2018-08-18T08:11:20.777761Z 1 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
  77. 2018-08-18T08:11:20.777783Z 1 [Note] WSREP: Assign initial position for certification: 3443542, protocol version: 3
  78. 2018-08-18T08:11:20.777841Z 0 [Note] WSREP: Service thread queue flushed.
  79. 2018-08-18T08:11:20.777897Z 1 [Note] WSREP: Check if state gap can be serviced using IST
  80. 2018-08-18T08:11:20.778016Z 1 [Note] WSREP: IST receiver addr using tcp://192.168.99.212:4568
  81. 2018-08-18T08:11:20.778164Z 1 [Note] WSREP: Prepared IST receiver, listening at: tcp://192.168.99.212:4568
  82. 2018-08-18T08:11:20.778182Z 1 [Note] WSREP: State gap can be likely serviced using IST. SST request though present would be void.
  83. 2018-08-18T08:11:20.778608Z 0 [Note] WSREP: Member 1.0 (db212) requested state transfer from '*any*'. Selected 2.0 (db210)(SYNCED) as donor.
  84. 2018-08-18T08:11:20.778620Z 0 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 3443542)
  85. 2018-08-18T08:11:20.778658Z 1 [Note] WSREP: Requesting state transfer: success, donor: 2
  86. 2018-08-18T08:11:20.778680Z 1 [Note] WSREP: GCache history reset: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:0 -> f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3443542
  87. 2018-08-18T08:11:21.108717Z 0 [Note] WSREP: 2.0 (db210): State transfer to 1.0 (db212) complete.
  88. 2018-08-18T08:11:21.109088Z 0 [Note] WSREP: Member 2.0 (db210) synced with group.
  89. 2018-08-18T08:11:21.127557Z WSREP_SST: [INFO] xtrabackup_ist received from donor: Running IST
  90. 2018-08-18T08:11:21.129735Z WSREP_SST: [INFO] Galera co-ords from recovery: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  91. 2018-08-18T08:11:21.140447Z 0 [Note] WSREP: SST complete, seqno: 3363765
  92. 2018-08-18T08:11:21.142362Z 0 [Note] InnoDB: PUNCH HOLE support available
  93. 2018-08-18T08:11:21.142385Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  94. 2018-08-18T08:11:21.142389Z 0 [Note] InnoDB: Uses event mutexes
  95. 2018-08-18T08:11:21.142393Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
  96. 2018-08-18T08:11:21.142396Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
  97. 2018-08-18T08:11:21.142400Z 0 [Note] InnoDB: Using Linux native AIO
  98. 2018-08-18T08:11:21.142716Z 0 [Note] InnoDB: Number of pools: 1
  99. 2018-08-18T08:11:21.142850Z 0 [Note] InnoDB: Using CPU crc32 instructions
  100. 2018-08-18T08:11:21.145049Z 0 [Note] InnoDB: Initializing buffer pool, total size = 5G, instances = 1, chunk size = 128M
  101. 2018-08-18T08:11:21.304608Z 0 [Note] InnoDB: Completed initialization of buffer pool
  102. 2018-08-18T08:11:21.344323Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
  103. 2018-08-18T08:11:21.389070Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /data/pxc/mysql3101/data/xb_doublewrite
  104. 2018-08-18T08:11:21.391376Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
  105. 2018-08-18T08:11:21.436004Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /data/pxc/mysql3101/data/xb_doublewrite, size 3932160 bytes
  106. 2018-08-18T08:11:21.573504Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
  107. 2018-08-18T08:11:21.573610Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
  108. 2018-08-18T08:11:21.604616Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
  109. 2018-08-18T08:11:21.605965Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
  110. 2018-08-18T08:11:21.605977Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
  111. 2018-08-18T08:11:21.606305Z 0 [Note] InnoDB: Waiting for purge to start
  112. 2018-08-18T08:11:21.656732Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.22-rel22 started; log sequence number 1767492650
  113. 2018-08-18T08:11:21.656892Z 0 [Note] InnoDB: Loading buffer pool(s) from /data/pxc/mysql3101/data/ib_buffer_pool
  114. 2018-08-18T08:11:21.657052Z 0 [Note] Plugin 'FEDERATED' is disabled.
  115. 2018-08-18T08:11:21.674392Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
  116. 2018-08-18T08:11:21.674407Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
  117. 2018-08-18T08:11:21.675138Z 0 [Warning] CA certificate ca.pem is self signed.
  118. 2018-08-18T08:11:21.675194Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
  119. 2018-08-18T08:11:21.675325Z 0 [Note] Server hostname (bind-address): '*'; port: 3101
  120. 2018-08-18T08:11:21.675378Z 0 [Note] IPv6 is available.
  121. 2018-08-18T08:11:21.675391Z 0 [Note] - '::' resolves to '::';
  122. 2018-08-18T08:11:21.675406Z 0 [Note] Server socket created on IP: '::'.
  123. 2018-08-18T08:11:21.694594Z 0 [Note] Event Scheduler: Loaded 0 events
  124. 2018-08-18T08:11:21.694696Z 0 [Note] WSREP: Signalling provider to continue on SST completion.
  125. 2018-08-18T08:11:21.694716Z 0 [Note] WSREP: Initialized wsrep sidno 2
  126. 2018-08-18T08:11:21.694734Z 0 [Note] WSREP: SST received: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3363765
  127. 2018-08-18T08:11:21.694799Z 1 [Note] WSREP: Receiving IST: 79777 writesets, seqnos 3363765-3443542
  128. 2018-08-18T08:11:21.694827Z 0 [Note] /usr/local/pxc/bin/mysqld: ready for connections.
  129. Version: '5.7.22-22-29.26-log' socket: '/3101/tmp/mysql.sock' port: 3101 Percona XtraDB Cluster binary (GPL) 5.7.22-29.26, Revision da86071, wsrep_29.26
  130. 2018-08-18T08:11:21.694933Z 0 [Note] WSREP: Receiving IST... 0.0% ( 0/79777 events) complete.
  131. 2018-08-18T08:11:21.803155Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180818 16:11:21
  132. 2018-08-18T08:11:22.764669Z 0 [Note] WSREP: (495569ff, 'tcp://0.0.0.0:4567') turning message relay requesting off
  133. 2018-08-18T08:11:31.696659Z 0 [Note] WSREP: Receiving IST... 83.8% (66816/79777 events) complete.
  134. 2018-08-18T08:11:33.502974Z 0 [Note] WSREP: Receiving IST...100.0% (79777/79777 events) complete.
  135. 2018-08-18T08:11:33.503181Z 1 [Note] WSREP: IST received: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6:3443542
  136. 2018-08-18T08:11:33.503586Z 0 [Note] WSREP: 1.0 (db212): State transfer from 2.0 (db210) complete.
  137. 2018-08-18T08:11:33.503600Z 0 [Note] WSREP: SST leaving flow control
  138. 2018-08-18T08:11:33.503606Z 0 [Note] WSREP: Shifting JOINER -> JOINED (TO: 3443542)
  139. 2018-08-18T08:11:33.503913Z 0 [Note] WSREP: Member 1.0 (db212) synced with group.
  140. 2018-08-18T08:11:33.503925Z 0 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 3443542)
  141. 2018-08-18T08:11:33.503943Z 1 [Note] WSREP: Synchronized with group, ready for connections
  142. 2018-08-18T08:11:33.503952Z 1 [Note] WSREP: Setting wsrep_ready to true
  143. 2018-08-18T08:11:33.503956Z 1 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
  1. Current database: *** NONE ***
  2. +------------------+----------+--------------+------------------+------------------------------------------------+
  3. | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
  4. +------------------+----------+--------------+------------------+------------------------------------------------+
  5. | mysql-bin.000003 | 194 | | | 0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3363764 |
  6. +------------------+----------+--------------+------------------+------------------------------------------------+
  7. 1 row in set (0.00 sec)
  8. root@localhost [(none)]>show global status like '%wsrep%';
  9. +----------------------------------+-------------------------------------------------------------+
  10. | Variable_name | Value |
  11. +----------------------------------+-------------------------------------------------------------+
  12. | wsrep_local_state_uuid | f5ea51e1-a1d0-11e8-b9c7-43286b421cc6 |
  13. | wsrep_protocol_version | 8 |
  14. | wsrep_last_applied | 3363765 |
  15. | wsrep_last_committed | 3363765 |
  16. | wsrep_replicated | 0 |
  17. | wsrep_replicated_bytes | 0 |
  18. | wsrep_repl_keys | 0 |
  19. | wsrep_repl_keys_bytes | 0 |
  20. | wsrep_repl_data_bytes | 0 |
  21. | wsrep_repl_other_bytes | 0 |
  22. | wsrep_received | 2 |
  23. | wsrep_received_bytes | 285 |
  24. | wsrep_local_commits | 0 |
  25. | wsrep_local_cert_failures | 0 |
  26. | wsrep_local_replays | 0 |
  27. | wsrep_local_send_queue | 0 |
  28. | wsrep_local_send_queue_max | 1 |
  29. | wsrep_local_send_queue_min | 0 |
  30. | wsrep_local_send_queue_avg | 0.000000 |
  31. | wsrep_local_recv_queue | 0 |
  32. | wsrep_local_recv_queue_max | 1 |
  33. | wsrep_local_recv_queue_min | 0 |
  34. | wsrep_local_recv_queue_avg | 0.000000 |
  35. | wsrep_local_cached_downto | 0 |
  36. | wsrep_flow_control_paused_ns | 0 |
  37. | wsrep_flow_control_paused | 0.000000 |
  38. | wsrep_flow_control_sent | 0 |
  39. | wsrep_flow_control_recv | 0 |
  40. | wsrep_flow_control_interval | [ 173, 173 ] |
  41. | wsrep_flow_control_interval_low | 173 |
  42. | wsrep_flow_control_interval_high | 173 |
  43. | wsrep_flow_control_status | OFF |
  44. | wsrep_cert_deps_distance | 0.000000 |
  45. | wsrep_apply_oooe | 0.000000 |
  46. | wsrep_apply_oool | 0.000000 |
  47. | wsrep_apply_window | 0.000000 |
  48. | wsrep_commit_oooe | 0.000000 |
  49. | wsrep_commit_oool | 0.000000 |
  50. | wsrep_commit_window | 0.000000 |
  51. | wsrep_local_state | 4 |
  52. | wsrep_local_state_comment | Synced |
  53. | wsrep_cert_index_size | 0 |
  54. | wsrep_cert_bucket_count | 22 |
  55. | wsrep_gcache_pool_size | 1320 |
  56. | wsrep_causal_reads | 0 |
  57. | wsrep_cert_interval | 0.000000 |
  58. | wsrep_ist_receive_status | |
  59. | wsrep_ist_receive_seqno_start | 0 |
  60. | wsrep_ist_receive_seqno_current | 0 |
  61. | wsrep_ist_receive_seqno_end | 0 |
  62. | wsrep_incoming_addresses | 192.168.99.212:3101,192.168.99.211:3101,192.168.99.210:3101 |
  63. | wsrep_desync_count | 0 |
  64. | wsrep_evs_delayed | |
  65. | wsrep_evs_evict_list | |
  66. | wsrep_evs_repl_latency | 0/0/0/0/0 |
  67. | wsrep_evs_state | OPERATIONAL |
  68. | wsrep_gcomm_uuid | 03a1abaf-a2bc-11e8-b1e3-a6c5831d0c91 |
  69. | wsrep_cluster_conf_id | 29 |
  70. | wsrep_cluster_size | 3 |
  71. | wsrep_cluster_state_uuid | f5ea51e1-a1d0-11e8-b9c7-43286b421cc6 |
  72. | wsrep_cluster_status | Primary |
  73. | wsrep_connected | ON |
  74. | wsrep_local_bf_aborts | 0 |
  75. | wsrep_local_index | 0 |
  76. | wsrep_provider_name | Galera |
  77. | wsrep_provider_vendor | Codership Oy <info@codership.com> |
  78. | wsrep_provider_version | 3.26(r) |
  79. | wsrep_ready | ON |
  80. +----------------------------------+-------------------------------------------------------------+
  81. 68 rows in set (0.00 sec)

将已有PXC节点关闭,查看grastate.dat中的seqno位置

  • 关闭前节点状态检查:
  1. root@localhost [(none)]>show global status like '%wsrep%';
  2. +----------------------------------+-------------------------------------------------------------+
  3. | Variable_name | Value |
  4. +----------------------------------+-------------------------------------------------------------+
  5. | wsrep_local_state_uuid | f5ea51e1-a1d0-11e8-b9c7-43286b421cc6 |
  6. | wsrep_protocol_version | 8 |
  7. | wsrep_last_applied | 3443542 |
  8. | wsrep_last_committed | 3443542 |
  9. | wsrep_replicated | 0 |
  10. | wsrep_replicated_bytes | 0 |
  11. | wsrep_repl_keys | 0 |
  12. | wsrep_repl_keys_bytes | 0 |
  13. | wsrep_repl_data_bytes | 0 |
  14. | wsrep_repl_other_bytes | 0 |
  15. | wsrep_received | 3 |
  16. | wsrep_received_bytes | 293 |
  17. | wsrep_local_commits | 0 |
  18. | wsrep_local_cert_failures | 0 |
  19. | wsrep_local_replays | 0 |
  20. | wsrep_local_send_queue | 0 |
  21. | wsrep_local_send_queue_max | 1 |
  22. | wsrep_local_send_queue_min | 0 |
  23. | wsrep_local_send_queue_avg | 0.000000 |
  24. | wsrep_local_recv_queue | 0 |
  25. | wsrep_local_recv_queue_max | 1 |
  26. | wsrep_local_recv_queue_min | 0 |
  27. | wsrep_local_recv_queue_avg | 0.000000 |
  28. | wsrep_local_cached_downto | 0 |
  29. | wsrep_flow_control_paused_ns | 0 |
  30. | wsrep_flow_control_paused | 0.000000 |
  31. | wsrep_flow_control_sent | 0 |
  32. | wsrep_flow_control_recv | 0 |
  33. | wsrep_flow_control_interval | [ 173, 173 ] |
  34. | wsrep_flow_control_interval_low | 173 |
  35. | wsrep_flow_control_interval_high | 173 |
  36. | wsrep_flow_control_status | OFF |
  37. | wsrep_cert_deps_distance | 0.000000 |
  38. | wsrep_apply_oooe | 0.000000 |
  39. | wsrep_apply_oool | 0.000000 |
  40. | wsrep_apply_window | 1.000000 |
  41. | wsrep_commit_oooe | 0.000000 |
  42. | wsrep_commit_oool | 0.000000 |
  43. | wsrep_commit_window | 1.000000 |
  44. | wsrep_local_state | 4 |
  45. | wsrep_local_state_comment | Synced |
  46. | wsrep_cert_index_size | 0 |
  47. | wsrep_cert_bucket_count | 22 |
  48. | wsrep_gcache_pool_size | 1536 |
  49. | wsrep_causal_reads | 0 |
  50. | wsrep_cert_interval | 0.000000 |
  51. | wsrep_ist_receive_status | |
  52. | wsrep_ist_receive_seqno_start | 0 |
  53. | wsrep_ist_receive_seqno_current | 0 |
  54. | wsrep_ist_receive_seqno_end | 0 |
  55. | wsrep_incoming_addresses | 192.168.99.211:3101,192.168.99.212:3101,192.168.99.210:3101 |
  56. | wsrep_desync_count | 0 |
  57. | wsrep_evs_delayed | |
  58. | wsrep_evs_evict_list | |
  59. | wsrep_evs_repl_latency | 0/0/0/0/0 |
  60. | wsrep_evs_state | OPERATIONAL |
  61. | wsrep_gcomm_uuid | 495569ff-a2be-11e8-90eb-3ff707d359ca |
  62. | wsrep_cluster_conf_id | 31 |
  63. | wsrep_cluster_size | 3 |
  64. | wsrep_cluster_state_uuid | f5ea51e1-a1d0-11e8-b9c7-43286b421cc6 |
  65. | wsrep_cluster_status | Primary |
  66. | wsrep_connected | ON |
  67. | wsrep_local_bf_aborts | 0 |
  68. | wsrep_local_index | 1 |
  69. | wsrep_provider_name | Galera |
  70. | wsrep_provider_vendor | Codership Oy <info@codership.com> |
  71. | wsrep_provider_version | 3.26(r) |
  72. | wsrep_ready | ON |
  73. +----------------------------------+-------------------------------------------------------------+
  74. 68 rows in set (0.00 sec)
  75. root@localhost [(none)]>show master status\G;
  76. *************************** 1. row ***************************
  77. File: mysql-bin.000004
  78. Position: 36617641
  79. Binlog_Do_DB:
  80. Binlog_Ignore_DB:
  81. Executed_Gtid_Set: 0a15ae1e-5e2f-ee17-4638-bcd794bde339:1-3443541
  82. 1 row in set (0.00 sec)
  83. ERROR:
  84. No query specified
  85. root@localhost [(none)]>shutdown;
  86. Query OK, 0 rows affected (0.00 sec)
  • 查看grastate.dat中的seqno位置
  1. [root@db212_16:20:45 /3101/data]
  2. #cat grastate.dat
  3. # GALERA saved state
  4. version: 2.1
  5. uuid: f5ea51e1-a1d0-11e8-b9c7-43286b421cc6
  6. seqno: 3443542
  7. safe_to_bootstrap: 0

PXC加入新节点避免SST时grastate.dat文件内容的修改问题的更多相关文章

  1. PXC添加新节点

    先拉数据,再启用节点,可以避免SST 拉数据 [root@pxc_node1_172.16.11.132 ~]# /usr/bin/innobackupex --defaults-file=/etc/ ...

  2. 查看pod创建时使用yaml文件内容

    除了 kubectl describe pod 以外,另一种获取 Pod 额外信息(除了 kubectl get pod)的方法 是给 kubectl get pod 增加 -o yaml 输出格式参 ...

  3. MySQL PXC构建一个新节点只需IST传输的方法

    需求场景:原有的pxc环境数据量已经比较大,新买的服务器要加入此集群中,如何让其用IST的方式传输,而不是SST. PXC传输数据有两种方式: IST: Incremental State Trans ...

  4. 使用percona xtradb cluster的IST方式添加新节点

    使用percona xtradb cluster的IST(Incremental State Transfer)特性添加新节点,防止新节点加入时使用SST(State SnapShop Transfe ...

  5. KingbaseES R6 集群通过备库clone在线添加新节点

    案例说明: KingbaseES R6集群可以通过图形化方式在线添加新节点,但是在添加新节点clone环节时,是从主库copy数据到新的节点,这样在生产环境,如果数据量大,将会对主库的网络I/O造成压 ...

  6. 修改linux的文件时,如何快速找到要修改的内容并修改

    修改linux系统下的文件时,如果文件内容很多,不容易找到需要修改的内容,下面详细介绍linux系统下如何快速修改文件. 工具/原料   linux系统 方法/步骤     在linux系统下,找到需 ...

  7. PXC(percona xtradb cluster)新加节点避免SST的方法

    环境: node1:192.168.0.100  pxc节点 node2:192.168.0.101  新节点 把新加入的节点先建立为node1的从库,可以使用mysqldump或innobackup ...

  8. 新节点在线加入PXC

    环境 192.168.139.151 新增节点 192.168.139.148-150 集群节点 192.168.139.151 已经安装好PXC软件 计划: 选用192.168.139.150 节点 ...

  9. pxc 集群节点被kill -9 了拿什么拯救?

    集群关机或者异常宕机,重启后想要以IST的方式加入集群,需要考虑集群中是否存在满足的节点,该节点的gcache还存放着停机期间所产生的事物. 重新初始化节点加入集群应该是最后的救命稻草. 这里模拟某个 ...

随机推荐

  1. HDU4043_FXTZ II

    题目描述的意思就不说了,自己考虑的时候就是在所有的排列中,碰到大于前面最大的出现数字的时候就乘以一个二分之一,然后求和. 打表后就会发现,答案分子为1*3*5*……*(2*n-1):分母为2*4*6* ...

  2. BZOJ 1924 所驼门王的宝藏(强连通分量缩点+DAG最长链)

    思路不是很难,因为宝藏只会在给出的n个点内有,于是只需要在这n个点里面连边,一个点如果能到达另一个点则连一条有向边, 这样用强连通分量缩点后答案就是DAG的最长链. 问题在于暴力建图是O(n^2)的, ...

  3. 【bzoj4695】最假女选手 线段树区间最值操作

    题目描述 给定一个长度为 N 序列,编号从 1 到 N .要求支持下面几种操作:1.给一个区间[L,R] 加上一个数x 2.把一个区间[L,R] 里小于x 的数变成x 3.把一个区间[L,R] 里大于 ...

  4. 抽屉点赞及jQuery CSS操作

    1.需要用到的知识点: CSS处理 $('t1').css('color','red') 点赞: -$('t1').append() -$('t1').remove() -setInterval -o ...

  5. android adb devices 后出现offline问题的解决

    Android在使用adb 命令时有时会发现设备的状态是offline,我的神呀,这怎么让我们调试呢.必须解决这个问题. 解决方式如下: 以下方法请确保你的设备处于调试模式下. 方法一:执行 #adb ...

  6. Spring MVC入门示例

    1.新建一个Java Web项目 2.导入jar包 3.在WEB-INF下面建一个hello.jsp页面. <%@ page language="java" import=& ...

  7. HDU 5489 二分 LIS

    Removed Interval Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) ...

  8. Python之数据库导入(py3.5)

    数据库版本:MySQL Python版本:3.5 之前用想用MySQLdb来着,后来发现py3.5版本不支持,现选择pymysql 现在想将数据库adidas中的表jd_comment读取至pytho ...

  9. ubuntu登陆界面损坏修复

    Ubuntu系统从14升16过程中,不小心进入休眠状态.之后Ubuntu桌面界面打不开.进入命令模式,手动修复 网上的答案是这样: 首先,测试桌面环境安装是否完全.sudo apt-get insta ...

  10. 跟我一起写Makefile(三)

    书写规则———— 规则包含两个部分,一个是依赖关系,一个是生成目标的方法. 在Makefile中,规则的顺序是很重要的,因为,Makefile中只应该有一个最终目标,其它的目标都是被这个目标所连带出来 ...