8.3.3. Changing Replicator States

You can manually change the replicator states on any node by using the trepctl command.

To switch to the OFFLINE state if you are currently ONLINE:

shell> trepctl offline

Unless there is an error, no information is reported. The current state can be verified using the trepctl status:

shell> trepctl status
Processing status command...
state                  : OFFLINE:NORMAL
timeInStateSeconds     : 21.409
uptimeSeconds          : 935.072

To switch back to the ONLINE state:

shell> trepctl online

When using replicator states in this manner, the replication between hosts is effectively paused. Any outstanding events from the master will be replicated to the slave with the replication continuing from the point where the node was switched to the OFFLINE state. The sequence number and latency will be reported accordingly, as seen in the example below where the node is significantly behind the master:

shell> trepctl status
Processing status command...
NAME                     VALUE
----                     -----
appliedLastEventId     : mysql-bin.000004:0000000005162941;0
appliedLastSeqno       : 21
appliedLatency         : 179.366