PT-1667 Added replication channels support to pt-archiver

This commit is contained in:
Carlos Salguero
2018-12-05 14:15:51 -03:00
parent d6b8863a3a
commit 152712f799
3 changed files with 132 additions and 0 deletions

View File

@@ -6275,6 +6275,7 @@ sub main {
OptionParser => $o,
DSNParser => $dp,
Quoter => $q,
channel => $o->get('channel'),
);
# we get each slave's connection handler (and its id, for debug and reporting)
for my $slave (@$lag_slaves_dsn) {
@@ -7472,6 +7473,18 @@ If C<LOAD DATA LOCAL INFILE> throws an error in the lines of C<The used
command is not allowed with this MySQL version>, refer to the documentation
for the C<L> DSN option.
=item --channel
type: string
Channel name used when connected to a server using replication channels.
Suppose you have two masters, master_a at port 12345, master_b at port 1236 and
a slave connected to both masters using channels chan_master_a and chan_master_b.
If you want to run pt-archiver to syncronize the slave against master_a, pt-archiver
won't be able to determine what's the correct master since SHOW SLAVE STATUS
will return 2 rows. In this case, you can use --channel=chan_master_a to specify
the channel name to use in the SHOW SLAVE STATUS command.
=item --charset
short form: -A; type: string