← Back to team overview

maria-developers team mailing list archive

Re: Best way of starting multi-source connections with active slave.

 

Thanks for the advice.
I did have a different domain ID for each master, but not for the slave,m which had 0. 
The conflict only happens if the slave keeps the default domain ID regardless of the masters having a definite one or not.

In the scenario described in my original message. If I set the domain ID of the slave before running the event #1, there is no conflict. 

Cheers

Giuseppe




From: Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx>
Reply: Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx>>
Date: 6 Aug 2015 at 09:10:51  
To: Giuseppe Maxia <g.maxia@xxxxxxxxx>>
Cc: maria-developers@xxxxxxxxxxxxxxxxxxx <maria-developers@xxxxxxxxxxxxxxxxxxx>>
Subject:  Re: [Maria-developers] Best way of starting multi-source connections with active slave.  

Giuseppe Maxia <g.maxia@xxxxxxxxx> writes:  

> I am setting up multi-source replication with four nodes, where nodes  
> 1, 2, and 3 are masters and node 4 is the slave of the first 3. The  
> slave is *active*, meaning that it has a binary log and runs  
> transactions of its own.   

> Got fatal error 1236 from master when reading data from binary log:  
> 'Error: connecting slave requested to start from GTID 0-104-1, which  
> is not in the master's binlog. Since the master's binlog contains  
> GTIDs with higher sequence numbers, it probably means that the slave  
> has diverged due to executing extra erroneous transactions'  
>  
> I get the same result if I use 'slave_pos' instead of 'current_pos'.   

You need to set gtid_domain_id different on each server:  

https://mariadb.com/kb/en/mariadb/global-transaction-id/#use-with-multi-source-replication-and-other-multi-master-setups  

This way, your slave's GTID position can be multi-dimensional, effectively  
tracking the position in each server individually, eg:  

1-101-50,2-102-100,3-103-90,4-104-1  

From the error it looks like you do not have different gtid_domain_id  
configured, but else do ask again if you still have problems.  

Hope this helps,  

- Kristian.  

References