Hi Sir,
So my both xtradb DR and primary env clusters have 3 node each, and only one node in DR I choose to be a slave of another node in primary env.
But after implementing gtid based replication using above provided steps between 1 primary node to 1 DR node, I was expecting other 2 nodes in DR will also replicate from Slave node of DR which is replicating from primary node.
But DR node which is configured as slave on that wsrep_cluster_size value become 0 and on other 2 nodes of DR wsrep_cluster_size value become 2.
I want slave node in DR should also replicate data coming from primary master node to other 2 nodes in DR env.
Logs on non-slave node of DR:
2022-10-18T07:01:03.602543Z 11 [Warning] [MY-000000] [WSREP] Event 1 Gtid apply failed: 1, seqno 1534
2022-10-18T07:01:03.608928Z 0 [Note] [MY-000000] [Galera] Member 0(hostnamet7) initiates vote on e3828439-4552-11ed-b097-f7e0d163013e:1534,a39f651ed2a1bfaf: Can't create database 'stess1'; database exists, Error_code: 1007; @@SESSION.GTID_NEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTID_MODE = OFF., Error_code: 1781;
2022-10-18T07:01:03.609006Z 0 [Note] [MY-000000] [Galera] Votes over e3828439-4552-11ed-b097-f7e0d163013e:1534:
a39f651ed2a1bfaf: 1/3
Waiting for more votes.
2022-10-18T07:01:03.609044Z 0 [Note] [MY-000000] [Galera] Member 1(hostnamet9) initiates vote on e3828439-4552-11ed-b097-f7e0d163013e:1534,a39f651ed2a1bfaf: Can't create database 'stess1'; database exists, Error_code: 1007; @@SESSION.GTID_NEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTID_MODE = OFF., Error_code: 1781;
2022-10-18T07:01:03.609076Z 0 [Note] [MY-000000] [Galera] Votes over e3828439-4552-11ed-b097-f7e0d163013e:1534:
a39f651ed2a1bfaf: 2/3
Winner: a39f651ed2a1bfaf
2022-10-18T07:01:03.643994Z 0 [Note] [MY-000000] [Galera] declaring 3942a4bd-905d at ssl://x.xx.xx.245:4567 stable
2022-10-18T07:01:03.644145Z 0 [Note] [MY-000000] [Galera] forgetting 6bb5cb25-aaa1 (ssl://x.xx.xx.225:4567)
2022-10-18T07:01:03.645270Z 0 [Note] [MY-000000] [Galera] Node 1dab87a5-acee state primary
2022-10-18T07:01:03.646042Z 0 [Note] [MY-000000] [Galera] Current view of cluster as seen by this node
view (view_id(PRIM,1dab87a5-acee,71)
memb {
1dab87a5-acee,0
3942a4bd-905d,0
}
joined {
}
left {
}
partitioned {
6bb5cb25-aaa1,0
}
)
2022-10-18T07:01:03.646096Z 0 [Note] [MY-000000] [Galera] Save the discovered primary-component to disk
2022-10-18T07:01:03.651067Z 0 [Note] [MY-000000] [Galera] forgetting 6bb5cb25-aaa1 (ssl://x.xx.xx.225:4567)
2022-10-18T07:01:03.651333Z 0 [Note] [MY-000000] [Galera] New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2
2022-10-18T07:01:03.651539Z 0 [Note] [MY-000000] [Galera] STATE_EXCHANGE: sent state UUID: a159c5cc-4eb2-11ed-9e95-37ff67e85fb1
2022-10-18T07:01:03.656616Z 0 [Note] [MY-000000] [Galera] STATE EXCHANGE: sent state msg: a159c5cc-4eb2-11ed-9e95-37ff67e85fb1
2022-10-18T07:01:03.657647Z 0 [Note] [MY-000000] [Galera] STATE EXCHANGE: got state msg: a159c5cc-4eb2-11ed-9e95-37ff67e85fb1 from 0 (hostnamet7)
2022-10-18T07:01:03.657710Z 0 [Note] [MY-000000] [Galera] STATE EXCHANGE: got state msg: a159c5cc-4eb2-11ed-9e95-37ff67e85fb1 from 1 (hostnamet9)
2022-10-18T07:01:03.657742Z 0 [Note] [MY-000000] [Galera] Quorum results:
version = 6,
component = PRIMARY,
conf_id = 21,
members = 2/2 (primary/total),
act_id = 1534,
last_appl. = 1510,
protocols = 2/10/4 (gcs/repl/appl),
vote policy= 0,
group UUID = e3828439-4552-11ed-b097-f7e0d163013e
2022-10-18T07:01:03.657929Z 0 [Note] [MY-000000] [Galera] Flow-control interval: [141, 141]
2022-10-18T07:01:03.658276Z 12 [Note] [MY-000000] [Galera] ####### processing CC 1535, local, ordered
2022-10-18T07:01:03.658327Z 12 [Note] [MY-000000] [Galera] Maybe drain monitors from 1534 upto current CC event 1535 upto:1534
2022-10-18T07:01:03.658354Z 12 [Note] [MY-000000] [Galera] Drain monitors from 1534 up to 1534
2022-10-18T07:01:03.658383Z 12 [Note] [MY-000000] [Galera] ####### My UUID: 1dab87a5-455c-11ed-acee-e7925eac4b07
2022-10-18T07:01:03.658408Z 12 [Note] [MY-000000] [Galera] Skipping cert index reset
2022-10-18T07:01:03.658432Z 12 [Note] [MY-000000] [Galera] REPL Protocols: 10 (5)
2022-10-18T07:01:03.658456Z 12 [Note] [MY-000000] [Galera] ####### Adjusting cert position: 1534 -> 1535
2022-10-18T07:01:03.658574Z 0 [Note] [MY-000000] [Galera] Service thread queue flushed.
2022-10-18T07:01:03.664011Z 12 [Note] [MY-000000] [Galera] ================================================
View:
id: e3828439-4552-11ed-b097-f7e0d163013e:1535
status: primary
protocol_version: 4
capabilities: MULTI-MASTER, CERTIFICATION, PARALLEL_APPLYING, REPLAY, ISOLATION, PAUSE, CAUSAL_READ, INCREMENTAL_WS, UNORDERED, PREORDERED, STREAMING, NBO
final: no
own_index: 0
members(2):
0: 1dab87a5-455c-11ed-acee-e7925eac4b07, hostnamet7
1: 3942a4bd-4953-11ed-905d-0a5568cb87fa, hostnamet9
=================================================
2022-10-18T07:01:03.664077Z 12 [Note] [MY-000000] [WSREP] wsrep_notify_cmd is not defined, skipping notification.
2022-10-18T07:01:03.675993Z 12 [Note] [MY-000000] [Galera] Recording CC from group: 1535
2022-10-18T07:01:03.676057Z 12 [Note] [MY-000000] [Galera] Lowest cert index boundary for CC from group: 1511
2022-10-18T07:01:03.676086Z 12 [Note] [MY-000000] [Galera] Min available from gcache for CC from group: 926
2022-10-18T07:01:09.104801Z 0 [Note] [MY-000000] [Galera] cleaning up 6bb5cb25-aaa1 (ssl://x.xx.xx.225:4567)
[root@hostnamet7 log]#
Logs on Slave DR node (errors you see related to LOCK TABLE/FLUSH TABLE come during restore of sql dump from master to slave), but replication between Primary master node and slave node working fine.
2022-10-18T06:58:17.940141Z 27 [System] [MY-010916] [Server] @@GLOBAL.GTID_PURGED was changed from '' to '10130818-45f9-11ed-924c-27f08e6f88e4:1-3, 38df0cdf-4d1a-11ed-a6b3-0b92abb9a557:1-10'.
11824 2022-10-18T06:58:17.940217Z 27 [System] [MY-010917] [Server] @@GLOBAL.GTID_EXECUTED was changed from 'e3828439-4552-11ed-b097-f7e0d163013e:1' to '10130818-45f9-11ed-924c-27f08e6f88e4:1-3, 38df0cdf-4d1a-11ed-a6 b3-0b92abb9a557:1-10, e3828439-4552-11ed-b097-f7e0d163013e:1'.
11825 2022-10-18T06:58:18.019463Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11826 2022-10-18T06:58:18.103127Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11827 2022-10-18T06:58:18.195188Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11828 2022-10-18T06:58:18.301681Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11829 2022-10-18T06:58:18.377869Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11830 2022-10-18T06:58:18.468862Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11831 2022-10-18T06:58:18.537406Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11832 2022-10-18T06:58:18.661763Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11833 2022-10-18T06:58:18.780342Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11834 2022-10-18T06:58:18.919704Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11835 2022-10-18T06:58:19.061906Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11836 2022-10-18T06:58:19.278519Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11837 2022-10-18T06:58:19.353623Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11838 2022-10-18T06:58:19.447235Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11839 2022-10-18T06:58:19.523316Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11840 2022-10-18T06:58:19.609538Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11841 2022-10-18T06:58:19.674726Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11842 2022-10-18T06:58:19.745211Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11843 2022-10-18T06:58:19.832070Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11844 2022-10-18T06:58:19.944945Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11845 2022-10-18T06:58:20.016321Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11846 2022-10-18T06:58:20.116453Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11847 2022-10-18T06:58:20.222985Z 27 [ERROR] [MY-000000] [WSREP] Percona-XtraDB-Cluster prohibits use of LOCK TABLE/FLUSH TABLE <table> WITH READ LOCK/FOR EXPORT with pxc_strict_mode = ENFORCING
11822,1 98%