michelya / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

Source ID is not reported correctly in direct role replication #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using the "direct" role ( a slave that deploys a remote master service), 
the source_id is displayed as the slave host, instead of the master host.

For example, I have the slave on qa.m4.continuent.com, and I create the service 
as follows:

./configure -b
./configure-service --create \
    -c tungsten.cfg \
    --role=direct \
    --extract-db-host=qa.r1.continuent.com \
    --extract-db-port=3306 \
    --extract-db-user=tungsten \
    --extract-db-password=secret \
    --master-host=qa.r1.continuent.com \
    --service-type=remote \
    --extract-method=relay \
    --channels=10 dragon

mysql -e 'select task_id, seqno,source_id, eventid from 
tungsten_dragon.trep_commit_seqno'
+---------+-------+----------------------+--------------------------------+
| task_id | seqno | source_id            | eventid                        |
+---------+-------+----------------------+--------------------------------+
|       0 |   608 | qa.r4.continuent.com | 000002:0000000000109477;208969 |
|       1 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
|       2 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
|       3 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
|       4 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
|       5 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
|       6 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
|       7 |   607 | qa.r4.continuent.com | 000002:0000000000109296;208968 |
|       8 |   608 | qa.r4.continuent.com | 000002:0000000000109477;208969 |
|       9 |   599 | qa.r4.continuent.com | 000002:0000000000107845;208960 |
+---------+-------+----------------------+--------------------------------+

I would expect to see qa.r1.continuent.com as source_id.

Why is this important?
One typical scenario is when a replicator supports two unrelated database 
servers in the same host, each of which replicates from a different master. 
Another scenario is when we use the direct role to implement multiple masters 
or a fan-in topology.
Then the source ID becomes very important.

Original issue reported on code.google.com by g.maxia on 20 Apr 2011 at 12:42

GoogleCodeExporter commented 9 years ago

Original comment by g.maxia on 20 May 2011 at 2:36

GoogleCodeExporter commented 9 years ago

Original comment by robert.h...@continuent.com on 23 Jan 2012 at 6:50