danielcheng007 / tungsten-replicator

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

with direct tungsten replicator appliedLatency can not refer latency with master #655

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.Master exec show master status,get File & Position File: my3306-bin.000057 
Position: 106
2.Master exec some SQL
3.slave install direct tungsten-replicator,such as:
./tools/tungsten-installer --home-directory=/DATA/tungsten --direct 
--start-and-report --master-host=192.168.230.79 --master-port=3306 
--master-user=tungsten --master-password=tungsten 
--master-log-directory=/DATA/mysql --master-log-pattern=my3306-bin 
--slave-host=192.168.230.94 --slave-port=3306 --slave-user=tungsten 
--slave-password=tungsten --slave-log-directory=/DATA/mysql 
--slave-log-pattern=my3306-bin --service-name=sdirect --channels=10 
--svc-parallelization-type=disk
4.slave exec: 
  trepctl offline
  trepctl online -from-event 000057:106
  trepctl status

What is the expected output?
appliedLatency         : 0

What do you see instead?
appliedLatency         : 254.261

What version of the product are you using?
version                : Tungsten Replicator 2.1.0 build 343
On what operating system?
2.6.18-274.el5 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 5.7 (Tikanga)

Please provide any additional information below.
Master all sql has applied on slave,I want The appliedLatency=0

The master no SQL,I still exec trepctl status on slave
the appliedLatency still=254.261 ,not change
After I exec:create table test001(id int) on master,
trepctl status ,the result 
appliedLatency         : 809.507 

The slave sync with master.The appliedLatency not is 0.
Notes:
direct mode slave.The appliedLatency can not refer latency with master.

Original issue reported on code.google.com by tunatan...@gmail.com on 30 Jul 2013 at 7:19

GoogleCodeExporter commented 9 years ago
There are a few things that could explain this behavior:
1) the installation runs with --start-and-report. This means that the slave 
went immediately online, and started replicating whatever the master was doing 
at that moment, until the replicator was taken offline a few seconds later. (to 
avoid this, you must add -a --auto-enable=false to the installation command)

2) since you are using parallel replication, the latency reported in trepctl 
status is the one related to the minimum transaction number in the stack. Since 
you probably were not using all the channels, you got the latency of one 
channel that was active before you started the replicator explicitly from a 
given position, and it is not updated

To see if this is the case,:
a) make sure the replicator is ONLINE
b) in the master, create 10 databases and create 1 table in each database
c) check trepctl status
and al check, inside mysql
  SELECT * from tungsten_sdirect.trep_commit_seqno
(You will see seqno and latency for each channel)

Original comment by g.maxia on 30 Jul 2013 at 10:33

GoogleCodeExporter commented 9 years ago
Question:
    When use direct mode,parallel apply,How to monitor the slave apply had synced with master,or slave how long delay with master.The appliedLatency can not refer the delay.
Thanks.

Original comment by tunatan...@gmail.com on 31 Jul 2013 at 1:16

GoogleCodeExporter commented 9 years ago
Please use the discussion group. This does not seem to be a valid bug report.
http://groups.google.com/group/tungsten-replicator-discuss

Original comment by g.maxia on 31 Jul 2013 at 4:46