mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 02:46:29 +01:00 
			
		
		
		
	 b167730499
			
		
	
	
	b167730499
	
	
	
		
			
			Problem was that initial GTID was set on wsrep_before_prepare out-of-order. In practice GTID was set to same as previous executed transaction GTID. In recovery valid GTID was found from prepared transaction and this transaction is committed leading to fact that same GTID was executed twice. This is fixed by setting invalid GTID at wsrep_before_prepare and later in wsrep_before_commit actual correct GTID is set and this setting is done while we are in commit monitor i.e. assigment is done in order of replication. In recovery if prepared transaction is found we check its GTID, if it is invalid transaction will be rolled back and if it is valid it will be committed. Initialize gtid seqno from recovered seqno when bootstrapping a new cluster. Added two test cases for both mariabackup and rsync SST methods to show that GTIDs remain consistent on cluster and that all expected rows are in the table. Added tests for wsrep GTID recovery with binlog on and off. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			808 B
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			808 B
		
	
	
	
		
			INI
		
	
	
	
	
	
| !include ../galera_2nodes.cnf
 | |
| 
 | |
| [mysqld]
 | |
| wsrep_sst_method=rsync
 | |
| gtid_strict_mode=ON
 | |
| wsrep-gtid_mode=ON
 | |
| log-bin
 | |
| log-slave_updates
 | |
| loose-galera-sst-rsync-gtid=1
 | |
| 
 | |
| [mysqld.1]
 | |
| wsrep_provider_options='pc.weight=2;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
 | |
| gtid_domain_id=10
 | |
| wsrep_gtid_domain_id=100
 | |
| wsrep_slave_threads=4
 | |
| server-id=10
 | |
| 
 | |
| [mysqld.2]
 | |
| wsrep_provider_options='pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
 | |
| gtid_domain_id=10
 | |
| wsrep_gtid_domain_id=100
 | |
| wsrep_slave_threads=4
 | |
| server-id=10
 |