zkfan / tungsten-replicator

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

Slave Online operation does not work with -from-event option #110

Closed GoogleCodeExporter closed 9 years ago

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

1.Slave if offline (for example, after an error)
2.Try to set slave back online by skipping a few seqnos using -from-event option

What is the expected output? What do you see instead?
Slave should go online. Instead, it tries to apply the next event it had in its 
thl and not the one that was indicated (which jus fails in case of error).

This seems to be due to the fact that the from-event option is not applied on 
the right stage of the pipeline.

Example:

bin/trepctl online -from-event 000003:0000000000004953

Log contains :
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,409 INFO  
replicator.pipeline.StageTaskGroup Looking up last applied event to position
 extractor
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,409 INFO  
replicator.pipeline.StageTaskGroup [q-to-dbms-0] Setting extractor position: 
seqno=9 event=000003:0000000000002028;0
...
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,409 INFO  
replicator.pipeline.StageTaskGroup Looking up last applied event to position 
extractor
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,410 INFO  
replicator.pipeline.StageTaskGroup [thl-to-q-0] Setting extractor position: 
seqno=9 event=000003:0000000000002028;0
...
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,410 INFO  
replicator.pipeline.StageTaskGroup Looking up last applied event to position 
extractor
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,411 INFO  
replicator.pipeline.StageTaskGroup [remote-to-thl-0] Setting extractor 
position: seqno=21 event=000003:0000000000004953;81
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,411 INFO  
management.tungsten.TungstenPlugin Initializing extractor to start at specific 
event ID: 000003:0000000000004953
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,411 INFO  
replicator.pipeline.Pipeline Starting pipeline: slave
INFO   | jvm 1    | 2011/06/13 10:08:17 | 2011-06-13 10:08:17,411 WARN  
replicator.thl.RemoteTHLExtractor Attempt to set last event ID on remote THL 
extractor: 000003:0000000000004953

Original issue reported on code.google.com by Steph.Giron on 13 Jun 2011 at 8:20

GoogleCodeExporter commented 9 years ago
This is not a bug.
Slave cannot start from an event id (this is only designed for master). In 
order to start a slave from a further event, other online options should be 
used.
Maybe there could be a better warning message telling that this option is 
ignored by slave.

Original comment by stephane...@gtempaccount.com on 6 Jul 2011 at 4:49