mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
Follow_PR-429_unstop_option_with_testcase
- Added information message about removing sentinel file - Added cross-links for options --stop and --unstop in docs - Added test case
This commit is contained in:
@@ -6244,6 +6244,8 @@ sub main {
|
||||
if ( $o->get('unstop') ) {
|
||||
unlink $sentinel
|
||||
or die "Cannot unlink sentinel file: $OS_ERROR\n";
|
||||
print STDOUT "Successfully removed file $sentinel\n"
|
||||
unless $quiet;
|
||||
}
|
||||
|
||||
# Generate a filename with sprintf-like formatting codes.
|
||||
@@ -8351,7 +8353,7 @@ Stop running instances by creating the sentinel file.
|
||||
|
||||
Causes pt-archiver to create the sentinel file specified by L<"--sentinel"> and
|
||||
exit. This should have the effect of stopping all running instances which are
|
||||
watching the same sentinel file.
|
||||
watching the same sentinel file. See also L<"--unstop">.
|
||||
|
||||
=item --txn-size
|
||||
|
||||
@@ -8383,7 +8385,7 @@ want to disable transactions so pt-archiver doesn't try to commit.
|
||||
Remove sentinel file
|
||||
|
||||
Causes pt-archiver to remove the sentinel file specified by L<"--sentinel"> and
|
||||
continue.
|
||||
continue. See also L<"--stop">.
|
||||
|
||||
=item --user
|
||||
|
||||
|
@@ -84,7 +84,26 @@ like(
|
||||
'Created the sentinel OK'
|
||||
);
|
||||
|
||||
diag(`rm -f $sentinel`);
|
||||
# Test --unstop, which removes the sentinel
|
||||
$output = output(
|
||||
sub { pt_archiver::main("--source", "D=test,t=table_1,F=$cnf",
|
||||
qw(--where 1=1 --why-quit --purge),
|
||||
"--sentinel", $sentinel, "--unstop")
|
||||
},
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Successfully removed file $sentinel/,
|
||||
'Removed the sentinel OK'
|
||||
) or diag($output);
|
||||
|
||||
$output = `/tmp/12345/use -N -e "select count(*) from test.table_1"`;
|
||||
is(
|
||||
$output + 0,
|
||||
0,
|
||||
'Rows were deleted'
|
||||
) or diag($output);
|
||||
|
||||
# #############################################################################
|
||||
# Issue 391: Add --pid option to mk-table-sync
|
||||
|
Reference in New Issue
Block a user