mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 06:00:14 +00:00
PT-87 Added --skip-check-slave-lag to pt-table-checksum
This commit is contained in:
@@ -11934,6 +11934,13 @@ ignored.
|
|||||||
You can change the list of hosts while OSC is executing:
|
You can change the list of hosts while OSC is executing:
|
||||||
if you change the contents of the DSN table, OSC will pick it up very soon.
|
if you change the contents of the DSN table, OSC will pick it up very soon.
|
||||||
|
|
||||||
|
=item --skip-check-slave-lag
|
||||||
|
|
||||||
|
type: DSN; repeatable: yes
|
||||||
|
|
||||||
|
DSN to skip when checking slave lag. It can be used multiple times.
|
||||||
|
Example: --skip-check-slave-lag h=127.1,P=12345 --skip-check-slave-lag h=127.1,P=12346
|
||||||
|
|
||||||
=item --slave-user
|
=item --slave-user
|
||||||
|
|
||||||
type: string
|
type: string
|
||||||
|
@@ -9707,14 +9707,6 @@ sub main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $slave_lag_cxns && scalar @$slave_lag_cxns ) {
|
|
||||||
for my $slave (@$slave_lag_cxns) {
|
|
||||||
printf("Checking lag on %s -> %s:%s\n", $slave->name(), $slave->{dsn}->{h}, $slave->{dsn}->{P});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
print "Not checking slave lag because no slaves were found or they were set to be skipped\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# #####################################################################
|
# #####################################################################
|
||||||
# Possibly check replication slaves and exit.
|
# Possibly check replication slaves and exit.
|
||||||
# #####################################################################
|
# #####################################################################
|
||||||
|
@@ -603,6 +603,26 @@ is(
|
|||||||
$master_dbh->do("DROP DATABASE IF EXISTS test");
|
$master_dbh->do("DROP DATABASE IF EXISTS test");
|
||||||
|
|
||||||
|
|
||||||
|
# Use the same data than the previous test
|
||||||
|
$master_dbh->do("DROP DATABASE IF EXISTS test");
|
||||||
|
|
||||||
|
$sb->load_file('master', "$sample/bug-1613915.sql");
|
||||||
|
$output = output(
|
||||||
|
sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=o1",
|
||||||
|
'--execute',
|
||||||
|
'--alter', "ADD COLUMN c INT",
|
||||||
|
'--chunk-size', '10',
|
||||||
|
'--skip-check-slave-lag', "h=127.0.0.1,P=".$sb->port_for('slave1'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
$output = output(
|
||||||
|
sub { pt_table_checksum::main(@args,
|
||||||
|
'--skip-check-slave-lag', "h=127.0.0.1,P=".$sb->port_for('slave1'),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
@@ -59,7 +59,6 @@ sub reset_repl_db {
|
|||||||
$master_dbh->do("use $repl_db");
|
$master_dbh->do("use $repl_db");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# ############################################################################
|
# ############################################################################
|
||||||
# Default checksum and results. The tool does not technically require any
|
# Default checksum and results. The tool does not technically require any
|
||||||
# options on well-configured systems (which the test env cannot be). With
|
# options on well-configured systems (which the test env cannot be). With
|
||||||
|
@@ -184,9 +184,9 @@ $output = output(
|
|||||||
|
|
||||||
chomp($output);
|
chomp($output);
|
||||||
|
|
||||||
like(
|
is(
|
||||||
$output,
|
$output,
|
||||||
qr/Checking lag on h=127.0.0.1,P=12346 -> 127.0.0.1:12346/,
|
'',
|
||||||
"Bug 1074179: ignore-tables-regex works with --replicate-check-only"
|
"Bug 1074179: ignore-tables-regex works with --replicate-check-only"
|
||||||
);
|
);
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
@@ -100,7 +100,7 @@ $output = output(
|
|||||||
|
|
||||||
is(
|
is(
|
||||||
$output,
|
$output,
|
||||||
"",
|
'',
|
||||||
"Resume with nothing to do"
|
"Resume with nothing to do"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -267,13 +267,13 @@ is_deeply(
|
|||||||
like(
|
like(
|
||||||
$first_tbl,
|
$first_tbl,
|
||||||
qr/sakila.payment$/,
|
qr/sakila.payment$/,
|
||||||
"Resumed from sakila.payment"
|
"Resuming from sakila.payment"
|
||||||
);
|
);
|
||||||
|
|
||||||
like(
|
like(
|
||||||
$output,
|
$output,
|
||||||
qr/^Resuming from sakila.payment chunk 7, timestamp 2011-10-15 13:00:28\n/,
|
qr/^Resuming from sakila.payment chunk 7, timestamp 2011-10-15 13:00:28/s,
|
||||||
"Resumed from sakila.payment chunk 7"
|
"Resuming from sakila.payment chunk 7"
|
||||||
);
|
);
|
||||||
|
|
||||||
is(
|
is(
|
||||||
@@ -564,7 +564,7 @@ $output = output(
|
|||||||
(undef, undef, $first_tbl) = split /\n/, $output;
|
(undef, undef, $first_tbl) = split /\n/, $output;
|
||||||
like(
|
like(
|
||||||
$first_tbl,
|
$first_tbl,
|
||||||
qr/test.t1$/,
|
qr/test.t1/,
|
||||||
"Resumed from test.t1"
|
"Resumed from test.t1"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -622,7 +622,7 @@ $output = output(
|
|||||||
(undef, undef, $first_tbl) = split /\n/, $output;
|
(undef, undef, $first_tbl) = split /\n/, $output;
|
||||||
like(
|
like(
|
||||||
$first_tbl,
|
$first_tbl,
|
||||||
qr/test.t1$/,
|
qr/test.t1/,
|
||||||
"Resumed from test.t1"
|
"Resumed from test.t1"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user