Hi, i’am doing some tests on my VMs - i installed Percona XtraDB Cluster (3 nodes). Configured it via official manual, cretead database “Percona” and table “mytable”.
Everything is synchronized:
wsrep_local_state | 4 |
wsrep_local_state_comment | Synced
There is a wsrep config:
[mysqld]
# Path to Galera library
wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
# Cluster connection URL contains IPs of nodes
#If no IP is found, this implies that a new cluster needs to be created,
#in order to do that you need to bootstrap this node
wsrep_cluster_address=gcomm://192.168.77.10,192.168.77.20,192.168.77.30
# In order for Galera to work correctly binlog format should be ROW
binlog_format=ROW
# MyISAM storage engine has only experimental support
default_storage_engine=InnoDB
# Slave thread to use
wsrep_slave_threads= 8
wsrep_log_conflicts
# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
innodb_autoinc_lock_mode=2
# Node IP address
wsrep_node_address=192.168.77.10
# Cluster name
wsrep_cluster_name=pxc-cluster
#If wsrep_node_name is not specified, then system hostname will be used
wsrep_node_name=pxc-cluster-node-1
#pxc_strict_mode allowed values: DISABLED,PERMISSIVE,ENFORCING,MASTER
pxc_strict_mode=ENFORCING
# SST method
wsrep_sst_method=xtrabackup-v2
#Authentication for SST method
wsrep_sst_auth=sstuser:passw0rd
wsrep_sync_wait=1
innodb_lock_wait_timeout=1000
Now, what’s the problem? I’ve created a procedure which inserts a 1Milion records into “my table”. I’am using DBeaver Client 6.2.0.
When i call my procedure with AUTO COMMIT OFF it runs about 35 seconds. Then i explicitly run commit. Commit is running about 5 seconds and then on all nodes in the same time i run a command “select count(*) from mytable;” and on 2 nodes it ends with error. On node 1 it shows right number of rows.
[URL]https://i.imgur.com/bAVa8o1.png[/URL]
When i run the same commands after 30 seconds, it shows on all nodes same values. Why transactions fail on node 2 and node 3 when parameter innodb_lock_wait_timeout is set really high?
On Galera Cluster this is working well, without problems.
Sorry for my bad english, i hope you understand me. Thanks