Question

I built a 2-node MariaDB Galera cluster(5.5.36), both node1 and node2 can see the changes if create a database/table, and even inserts 1 row into the created table, but If import a csv file(300,000+ lines, use "LOAD DATA INFILE...") to the created table from node1, node2 will not see any changes.

Why node2 is not synchronized while import rows from a csv file?

The following is configuration file of node1 under /etc/my.cnf, the configuration of node2 is only switch the ip addresses

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

[mariadb]
wsrep_cluster_address=gcomm://172.16.10.01
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_sst_auth=root:password
wsrep_node_address=172.16.10.02
log-error=/var/log/mysql.log
log_slave_updates=ON
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
Was it helpful?

Solution

Use batch insert all nodes will be replicated, do not use "LOAD DATA INFILE" to import the csv file. I found this online: Maria Galera Cluster is true parallel replication, on row level.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top