6

I am trying to setup a multi-master type of replication with each master having an additional slave using Tungsten. As an example, lets say I have 4 hosts (A,B,C,D) and hosts A and C are the masters, with B being a slave to A and D being a slave to C.

With my current configuration, I will add data to A. This gets replicated to its slave B and to the other master C with no issue. The same happens with I add data to C, its slave D gets updated and the other master A gets updated. The problem is when A gets updated, D will not see the changes. I do not want A to update D, but rather have D get all of the updates from C, which would also have B get all of its updates from A.

Here is the configuration script I have been working on.

MASTER1='master1-ca' #<-- 'A' from example
MASTER2='master2-va' #<-- 'C' from example
SLAVE1='slave1-ca'   #<-- 'B' from example
SLAVE2='slave2-va'   #<-- 'D' from example

./tools/tpm configure defaults  \
    --reset \
    --replication-user=tungsten \
    --replication-password=password \
    --home-directory=/home/tungsten/PCS_DB \
    --datasource-mysql-conf=/etc/mysql/my.cnf \
    $( cat ./cookbook/security.options ) \
    --start

./tools/tpm configure PCS_Multi \
    --masters=$MASTER1,$MASTER2 \
    --master-services=west,east \
    $( cat ./cookbook/security.options ) \
    --topology=all-masters

./tools/tpm configure west \
    --hosts=$MASTER1,$SLAVE1 \
    --slaves=$SLAVE1 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER1 

./tools/tpm configure east \
    --hosts=$MASTER2,$SLAVE2 \
    --slaves=$SLAVE2 \
    $( cat ./cookbook/security.options ) \
    --master=$MASTER2

./tools/tpm install

I have been looking through documentation and tutorials for a few days now and can't seem to figure out this last piece. I have tried to setup a relay from $MASTER1 to $SLAVE1 but since there is not a lot of documentation on setting up a relay (at least from what I could find) I do not know if I am doing it correctly (or if I should even be doing that in the first place).

1 Answer 1

1

I don't have direct experience with a similar setup, but you probably need to set this option on the master services:

--log-slave-updates           Should slaves log updates to binlog [false]

By default, changes made by appliers are not written to the binlog. As Tungsten watches the binlog to detect changes, the master extractor will not see those changes made by appliers, unless you specify the options above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.