Compare commits

...

34 Commits

Author SHA1 Message Date
Sveta Smirnova
d9b0219d9e Changed replica_parallel_workers in configuration for 8.0 and 8.4 to o, because wiat_for_replicas is buggy for multi-threaded slaves 2024-12-14 20:19:03 +03:00
Sveta Smirnova
1d3a44c5da RESET test for t/pt-table-checksum/pt-1616.t 2024-12-14 14:04:19 +03:00
Sveta Smirnova
a6a3199a3c Setting SQL Delay back to 0 explicitly 2024-12-13 17:28:39 +03:00
Sveta Smirnova
fadf758cb4 Removed extra ->wait_for_replicas();
from t/pt-table-checksum/pt-1616.t
2024-12-12 20:49:07 +03:00
Sveta Smirnova
25ba843cdd better cleaning in t/pt-table-sync/safety_checks.t 2024-12-12 13:41:22 +03:00
Sveta Smirnova
4906b6a348 Test in t/pt-table-checksum/chunk_size.t 2024-12-10 16:47:40 +03:00
Sveta Smirnova
18dba10c60 Test in t/pt-table-checksum/chunk_size.t 2024-12-10 15:59:19 +03:00
Sveta Smirnova
5039621d29 Diagnostic added to t/pt-table-checksum/chunk_size.t, t/pt-table-checksum/resume.t 2024-12-10 15:30:33 +03:00
Sveta Smirnova
c30baedf41 Merge branch 'release-v3.7.0' into release-v3.7.0-test 2024-12-10 15:25:56 +03:00
Sveta Smirnova
19b0927001 Added wait_for_replicas call into t/pt-table-checksum/pt-1616.t 2024-12-03 16:00:53 +03:00
Sveta Smirnova
9ccecb2d50 Added wait_for_replicas call into t/pt-table-sync/char_chunking.t 2024-12-02 17:43:47 +03:00
Sveta Smirnova
2de6e9ba9e Better diagnostic output in t/pt-upgrade/run_time.t 2024-12-02 17:40:37 +03:00
Sveta Smirnova
f8e3ece9ee Added diagnostic code into t/pt-table-sync/issue_627.t 2024-12-02 17:38:37 +03:00
Sveta Smirnova
5f79b34dfc Added wait_for_replicas call into t/pt-table-sync/issue_218.t 2024-12-02 17:37:16 +03:00
Sveta Smirnova
2eccd39129 Removed some waitpid test 2024-12-02 17:31:05 +03:00
Sveta Smirnova
ef04237618 Test waitpid in t/pt-table-sync/pt-1194.t 2024-11-29 07:08:48 +03:00
Sveta Smirnova
df2cc0c9ca Test waitpid in t/pt-table-sync/pt-1194.t 2024-11-29 01:51:12 +03:00
Sveta Smirnova
6aacdda0e6 Lmo submodules in pt-visual-explain 2024-11-29 01:28:42 +03:00
Sveta Smirnova
b2dd791512 Lmo in pt-visual-explain, fixed syntax error 2024-11-29 01:05:56 +03:00
Sveta Smirnova
e7580f2519 Lmo in pt-visual-explain 2024-11-28 23:08:00 +03:00
Sveta Smirnova
22208f01a2 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 13 2024-11-27 23:40:37 +03:00
Sveta Smirnova
f85d8b0194 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 12 2024-11-27 23:22:09 +03:00
Sveta Smirnova
8b67b26f7e Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 11 2024-11-27 23:06:55 +03:00
Sveta Smirnova
0e4df890c4 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 10 2024-11-27 22:47:48 +03:00
Sveta Smirnova
0fd43b871d Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 9 2024-11-27 22:23:26 +03:00
Sveta Smirnova
8c731e52c0 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 8 2024-11-27 21:59:24 +03:00
Sveta Smirnova
95e95f95d6 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 7 2024-11-27 21:50:40 +03:00
Sveta Smirnova
e84d985e3f Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 7 2024-11-27 21:39:33 +03:00
Sveta Smirnova
0869d14d19 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 6 2024-11-27 16:53:15 +03:00
Sveta Smirnova
8231dae4c0 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 5 2024-11-27 16:43:01 +03:00
Sveta Smirnova
aad0a26789 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 4 2024-11-27 16:31:21 +03:00
Sveta Smirnova
8d03f3c8b8 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 3 2024-11-27 16:18:59 +03:00
Sveta Smirnova
eafbaca786 Release 3.7.0: testing ncat issue on Percona Jenkins machines, try 2 2024-11-27 16:12:03 +03:00
Sveta Smirnova
5da16d53f4 Release 3.7.0: testing ncat issue on Percona Jenkins machines 2024-11-27 16:02:18 +03:00
15 changed files with 59 additions and 12 deletions

View File

@@ -465,6 +465,7 @@ sub is_cluster_node {
sub can_load_data {
my ($self, $server) = @_;
my $output = $self->use($server, q{-e "SELECT * FROM percona_test.load_data"});
#die(0 =~ /1/);
return ($output || '') =~ /1/;
}

View File

@@ -40,3 +40,6 @@ binlog_format = STATEMENT
#performance-schema-instrument='wait/lock/metadata/sql/mdl=ON'
#performance-schema-instrument='transaction=ON'
secure-file-priv =
# wait_for_replica buggy on multi-threaded replica
slave-parallel-workers=0

View File

@@ -40,3 +40,6 @@ binlog_format = STATEMENT
#performance-schema-instrument='wait/lock/metadata/sql/mdl=ON'
#performance-schema-instrument='transaction=ON'
secure-file-priv =
# wait_for_replica buggy on multi-threaded replica
replica-parallel-workers=0

View File

@@ -251,6 +251,7 @@ like(
# Done.
# #############################################################################
$replica1_dbh->do("STOP ${replica_name}");
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$source_dbh->do("RESET ${source_reset}");
$replica1_dbh->do("RESET ${replica_name}");
$replica1_dbh->do("START ${replica_name}");

View File

@@ -398,6 +398,7 @@ $replica_dbh2 = $sb->get_dbh_for('replica2');
diag("Setting replica delay to 0 seconds");
$replica_dbh1->do("STOP ${replica_name}");
$replica_dbh2->do("STOP ${replica_name}");
$replica_dbh1->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$source_dbh->do("RESET ${source_reset}");
$replica_dbh1->do("RESET ${source_reset}");
$replica_dbh1->do("RESET ${replica_name}");

View File

@@ -162,6 +162,7 @@ $replica_dbh2 = $sb->get_dbh_for('replica2');
diag("Setting replica delay to 0 seconds");
$replica_dbh1->do("STOP ${replica_name}");
$replica_dbh2->do("STOP ${replica_name}");
$replica_dbh1->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$source_dbh->do("RESET ${source_reset}");
$replica_dbh1->do("RESET ${replica_name}");
$replica_dbh2->do("RESET ${replica_name}");

View File

@@ -328,6 +328,7 @@ $replica_dbh2 = $sb->get_dbh_for('replica2');
diag("Setting replica delay to 0 seconds");
$replica_dbh1->do("STOP ${replica_name}");
$replica_dbh2->do("STOP ${replica_name}");
$replica_dbh1->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$source_dbh->do("RESET ${source_reset}");
$replica_dbh1->do("RESET ${replica_name}");
$replica_dbh2->do("RESET ${replica_name}");

View File

@@ -98,6 +98,8 @@ unlike(
diag("Setting replica delay to 0 seconds");
$replica1_dbh->do("STOP ${replica_name}");
$replica2_dbh->do("STOP ${replica_name}");
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$replica2_dbh->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$source_dbh->do("RESET ${source_reset}");
$replica1_dbh->do("RESET ${replica_name}");
$replica1_dbh->do("START ${replica_name}");

View File

@@ -354,6 +354,7 @@ $sb->do_as_root("source", q/FLUSH TABLES/);
diag("Setting replica delay to 0 seconds");
$replica_dbh->do("STOP ${replica_name}");
$replica_dbh->do("CHANGE ${source_change} TO ${source_name}_DELAY=0");
$source_dbh->do("RESET ${source_reset}");
$replica_dbh->do("RESET ${replica_name}");
$replica_dbh->do("START ${replica_name}");

View File

@@ -104,7 +104,7 @@ unlike(
$output,
qr/Cannot checksum table/,
"Very small --chunk-time doesn't cause zero --chunk-size"
);
) or diag($output);
}
# #############################################################################
# Bug 921700: pt-table-checksum doesn't add --where to chunk-oversize test

View File

@@ -12,7 +12,7 @@ use English qw(-no_match_vars);
use Test::More;
#if ( !$ENV{SLOW_TESTS} ) {
# plan skip_all => "pt-table-checksum/replication_filters.t is one of the top slowest files; set SLOW_TESTS=1 to enable it.";
# plan skip_all => "pt-table-checksum/pt-1616.t is one of the top slowest files; set SLOW_TESTS=1 to enable it.";
#}
use PerconaTest;
@@ -23,6 +23,8 @@ require "$trunk/bin/pt-table-checksum";
my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $dbh = $sb->get_dbh_for('source');
my $replica1_dbh = $sb->get_dbh_for('replica1');
my $replica2_dbh = $sb->get_dbh_for('replica2');
if ( !$dbh ) {
plan skip_all => 'Cannot connect to sandbox source';
@@ -104,7 +106,18 @@ unlike(
# #############################################################################
# Done.
# #############################################################################
$sb->wipe_clean($dbh);
diag("Resetting replicas, because this test sporadically fails");
$replica1_dbh->do("STOP ${replica_name}");
$replica2_dbh->do("STOP ${replica_name}");
$dbh->do("RESET ${source_reset}");
$replica1_dbh->do("RESET ${replica_name}");
$replica1_dbh->do("START ${replica_name}");
$replica2_dbh->do("RESET ${replica_name}");
$replica2_dbh->do("START ${replica_name}");
diag("Replicas reset, syncing");
$sb->wait_for_replicas();
diag("Cleaning up");
$sb->wipe_clean($dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
exit;

View File

@@ -127,7 +127,7 @@ is_deeply(
[qw( sakila city )],
],
"Checksum results for 1/4 of sakila singles"
);
) or diag(Dumper($row));
$output = output(
sub { pt_table_checksum::main(@args, qw(-d sakila --resume --chunk-size 10000)) },

View File

@@ -49,7 +49,7 @@ like(
$output,
qr/#\s+0\s+4\s+0\s+0\s+Chunk\s+/,
"Chunks char col"
);
) or diag($output);
like(
$output,
qr/FORCE INDEX \(`c`\)/,

View File

@@ -10,6 +10,7 @@ use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More;
use POSIX ":sys_wait_h";
use PerconaTest;
use Sandbox;
@@ -38,26 +39,36 @@ else {
plan tests => 3;
}
diag("OK\n");
$sb->load_file('source', "t/pt-table-sync/samples/pt-1205.sql");
diag("OK 2\n");
$sb->wait_for_replicas();
diag("OK 3\n");
# Setting up tunnels
my $pid1 = fork();
if ( !$pid1 ) {
setpgrp;
system('ncat -k -l localhost 3333 --sh-exec "ncat 127.0.0.1 12345"');
system('ncat -k -l localhost 33333 --sh-exec "ncat 127.0.0.1 12345"');
diag("OK 4\n");
exit;
}
diag("OK 5\n");
my $pid2 = fork();
if ( !$pid2 ) {
setpgrp;
system('ncat -k -l localhost 3334 --sh-exec "ncat 127.0.0.1 12346"');
system('ncat -k -l localhost 33334 --sh-exec "ncat 127.0.0.1 12346"');
diag("OK 6\n");
exit;
}
diag("OK 7\n");
my $o = new OptionParser();
my $q = new Quoter();
my $ms = new MasterSlave(
@@ -67,28 +78,35 @@ my $ms = new MasterSlave(
);
my $ss = $ms->get_replica_status($replica1_dbh);
diag("OK 8\n");
$replica1_dbh->do("STOP ${replica_name}");
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_PORT=3333, ${source_name}_LOG_POS=" . $ss->{"exec_${source_name}_log_pos"});
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_PORT=33333, ${source_name}_LOG_POS=" . $ss->{"exec_${source_name}_log_pos"});
$replica1_dbh->do("START ${replica_name}");
my $output = `$trunk/bin/pt-table-sync h=127.0.0.1,P=3334,u=msandbox,p=msandbox --database=test --table=t1 --sync-to-source --execute --verbose 2>&1`;
diag("OK 9\n");
my $output = `$trunk/bin/pt-table-sync h=127.0.0.1,P=33334,u=msandbox,p=msandbox --database=test --table=t1 --sync-to-source --execute --verbose 2>&1`;
diag("OK 10\n");
unlike(
$output,
qr/The replica is connected to \d+ but the source's port is/,
'No error for redirected replica'
) or diag($output);
diag("OK 11\n");
kill -1, getpgrp($pid1);
kill -1, getpgrp($pid2);
diag("OK 12\n");
$replica1_dbh->do("STOP ${replica_name}");
$ss = $ms->get_replica_status($replica1_dbh);
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_PORT=12347, ${source_name}_LOG_POS=" . $ss->{"exec_${source_name}_log_pos"});
$replica1_dbh->do("START ${replica_name} SQL_THREAD");
diag("OK 13\n");
$output = `$trunk/bin/pt-table-sync h=127.0.0.1,P=12346,u=msandbox,p=msandbox --database=test --table=t1 --sync-to-source --execute --verbose 2>&1`;
diag("OK 14\n");
like(
$output,
qr/The server specified as a source has no connected replicas/,
@@ -98,9 +116,12 @@ like(
$replica1_dbh->do("STOP ${replica_name}");
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_PORT=12345, ${source_name}_LOG_POS=" . $ss->{"exec_${source_name}_log_pos"});
$replica1_dbh->do("START ${replica_name}");
diag("OK 15\n");
# #############################################################################
# Done.
# #############################################################################
$sb->wipe_clean($source_dbh);
diag("OK 16\n");
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
diag("OK 17\n");
exit;

View File

@@ -146,9 +146,8 @@ like(
$replica1_dbh->do("STOP ${replica_name}");
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_port=12345, ${source_name}_user='msandbox'");
$replica1_dbh->do("START ${replica_name}");
$replica1_dbh->do("STOP ${replica_name}");
$replica1_dbh->do("CHANGE ${source_change} TO ${source_name}_port=12345, ${source_name}_user='msandbox'");
$source_dbh->do("RESET ${source_reset}");
$replica1_dbh->do("RESET ${replica_name}");
$replica1_dbh->do("START ${replica_name}");
# #############################################################################