Fatal error if slave dies. Make Cxn::connect() if dbh id dead. Sort slave lag properly and use Cxn instead of dbh in ReplicaLagWaiter. Check master cxn before keepalive. Sleep N+0.25 waiting for chunks.

This commit is contained in:
Daniel Nichter
2011-10-10 10:56:08 -06:00
parent eae742ee78
commit b2f92391a7
5 changed files with 107 additions and 48 deletions

View File

@@ -89,7 +89,8 @@ diag(`rm $outfile >/dev/null 2>&1`);
# the tool runs without errors or warnings and checksums all tables.
ok(
no_diff(
sub { pt_table_checksum::main($dsn, '--create-replicate-table') },
sub { pt_table_checksum::main($dsn, '--create-replicate-table',
qw(--lock-wait-timeout 3)) },
"$sample/default-results-5.1.txt",
post_pipe => 'awk \'{print $2 " " $3 " " $4 " " $6 " " $8}\'',
),
@@ -112,7 +113,8 @@ cmp_ok(
ok(
no_diff(
sub { pt_table_checksum::main($dsn, qw(--chunk-time 0)) },
sub { pt_table_checksum::main($dsn, qw(--chunk-time 0),
qw(--lock-wait-timeout 3)) },
"$sample/static-chunk-size-results-5.1.txt",
post_pipe => 'awk \'{print $2 " " $3 " " $4 " " $5 " " $6 " " $8}\'',
),