Replicators can have one of five roles, Extractor(master),Applier(slave), thl-server, thl-client or thl-applier.
A replicator in a master
role
extracts data from a source database (for example, by reading the
binary log from a MySQL server), and generates THL. As a
master
the replicator also
provides the THL to other replicators over the network connection.
A slave
replicator pulls THL
data from a master
and then
applies that data to a target database.
A thl-server
replicator is a special role
that Extractor replicators can be changed to temporarily when a Primary is taken offline.
This will allow downstream Applier replicators to download and apply any THL that hasn't
yet been processed by the Applier.
To enable this role, issue the following statements
shell>trepctl offline
shell>trepctl setrole -role thl-server
shell>trepctl online
To revert back to the original Extractor role, issue the following
shell>trepctl offline
shell>trepctl setrole -role master
shell>trepctl online
A thl-client
replicator is a special role
that Applier replicators can be changed to. This will allow the Applier replicator
to download any THL available from the upstream Extractor, but does NOT apply the THL to
the target database.
To enable this role, issue the following statements
shell>trepctl offline
shell>trepctl setrole -role thl-client
shell>trepctl online
To revert back to the original Applier role, issue the following
shell>trepctl offline
shell>trepctl setrole -role slave
shell>trepctl online
A thl-applier
replicator is a special role
that applier replicators can be changed to temporarily when a Primary is taken offline.
This will allow downstream applier replicators to apply any locally available THL that hasn't
yet been processed by the applier.
To enable this role, issue the following statements
shell>trepctl offline
shell>trepctl setrole -role thl-applier
shell>trepctl online
To revert back to the original role, issue the following
shell>trepctl offline
shell>trepctl setrole -role slave
shell>trepctl online