mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 18:34:59 +00:00
now accepts recursion-method=none on PXC for specialized purposes - 1373937
This commit is contained in:
@@ -9363,9 +9363,16 @@ sub main {
|
|||||||
|
|
||||||
if ( $cluster_name_for{$master_cxn} ) {
|
if ( $cluster_name_for{$master_cxn} ) {
|
||||||
if ( !@$slaves ) {
|
if ( !@$slaves ) {
|
||||||
die $master_cxn->name() . " is a cluster node but no other nodes "
|
if ( ($o->get('recursion-method')->[0] || '') ne 'none' ) {
|
||||||
. "or regular replicas were found. Use --recursion-method=dsn "
|
die $master_cxn->name() . " is a cluster node but no other nodes "
|
||||||
. "to specify the other nodes in the cluster.\n";
|
. "or regular replicas were found. Use --recursion-method=dsn "
|
||||||
|
. "to specify the other nodes in the cluster.\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
warn "WARNING !!! Using --recursion-method=none. "
|
||||||
|
. "No diffs will be found because no other nodes will be checksummed. "
|
||||||
|
. "Use method 'cluster' or 'dsn' (see docs) if you want to find diffs.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make sure the master and all node are in the same cluster.
|
# Make sure the master and all node are in the same cluster.
|
||||||
@@ -12240,9 +12247,10 @@ DSNs are ordered by C<id>, but C<id> and C<parent_id> are otherwise ignored.
|
|||||||
The C<dsn> column contains a replica DSN like it would be given on the command
|
The C<dsn> column contains a replica DSN like it would be given on the command
|
||||||
line, for example: C<"h=replica_host,u=repl_user,p=repl_pass">.
|
line, for example: C<"h=replica_host,u=repl_user,p=repl_pass">.
|
||||||
|
|
||||||
The C<none> method prevents the tool from connecting to any replicas.
|
The C<none> method prevents the tool from connecting to any replicas or nodes.
|
||||||
This effectively disables all the L<"REPLICA CHECKS"> because there will
|
This effectively disables all the L<"REPLICA CHECKS"> because there will
|
||||||
not be any replicas to check. Therefore, this method is not recommended.
|
not be any replicas to check. Therefore, this method is not recommended unless
|
||||||
|
it's for a specialized purpose where you only need to obtain checksums for one server.
|
||||||
|
|
||||||
=item --replicate
|
=item --replicate
|
||||||
|
|
||||||
|
@@ -81,6 +81,17 @@ like(
|
|||||||
"Dies if no other nodes are found"
|
"Dies if no other nodes are found"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
($output, $exit_status) = full_output(
|
||||||
|
sub { pt_table_checksum::main(@args, '--recursion-method', 'none') },
|
||||||
|
stderr => 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
ok (
|
||||||
|
$output =~ qr/WARNING/i && !$exit_status,
|
||||||
|
"Warns but doesn't die if --recursion-method=none - issue #1373937"
|
||||||
|
);
|
||||||
|
|
||||||
for my $args (
|
for my $args (
|
||||||
["using recusion-method=dsn", '--recursion-method', "dsn=$node1_dsn,D=dsns,t=dsns"],
|
["using recusion-method=dsn", '--recursion-method', "dsn=$node1_dsn,D=dsns,t=dsns"],
|
||||||
["using recursion-method=cluster", '--recursion-method', 'cluster']
|
["using recursion-method=cluster", '--recursion-method', 'cluster']
|
||||||
@@ -232,7 +243,7 @@ for my $args (
|
|||||||
# Wait for the slave to apply the binlogs from node1 (its master).
|
# Wait for the slave to apply the binlogs from node1 (its master).
|
||||||
# Then change it so it's not consistent.
|
# Then change it so it's not consistent.
|
||||||
PerconaTest::wait_for_table($slave_dbh, 'test.t');
|
PerconaTest::wait_for_table($slave_dbh, 'test.t');
|
||||||
$sb->wait_for_slaves('cslave1');
|
$sb->wait_for_slaves(master => 'node1', slave => 'cslave1');
|
||||||
$slave_dbh->do("update test.t set c='zebra' where c='z'");
|
$slave_dbh->do("update test.t set c='zebra' where c='z'");
|
||||||
|
|
||||||
$output = output(
|
$output = output(
|
||||||
|
Reference in New Issue
Block a user