[Suggest]pt-online-schema-change pausible.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Carlos Salguero |
Bug Description
* Mysql5.6.25 Enterprise, pt-online-
We report on this already to forum.
https:/
Why? this feature is required?
=> we have very big table and it takes 2 days more, so peak time is not evitable.
, we have been troubled during peak time.
innodb_
=> --sleep=0.5 --chunk-size=500 --max-lag=1 is helpful. but not enough.
So, we suggest pause function on peak time. we tested and worked fine.
please consider this and give us your opinon for this.
Below code is simple and works when I create pause_please.txt file.
package NibbleIterator;
sub next()
NIBBLE:
while ( $self->{have_rows} || $self->
if ( !$self->{have_rows} ) {
$self-
PTDEBUG && _d('Nibble:', $self->
join(', ', (@{$self->{lower} || []}, @{$self->{upper} || []})));
if ( my $callback = $self->
$self->{have_rows} = $callback-
}
else {
$self-
$self->{have_rows} = $self->
}
PTDEBUG && _d($self-
}
if ( $self->{have_rows} ) {
my $row = $self->
if ( $row ) {
$self->{rowno}++;
PTDEBUG && _d('Row', $self->{rowno}, 'in nibble'
return [ @$row ];
}
}
PTDEBUG && _d('No rows in nibble or nibble skipped');
if ( my $callback = $self->
$callback-
}
$self->{rowno} = 0;
$self->{have_rows} = 0;
# =======
while(-f "pause_please.txt") {
print "Im sleeping\n";
my $dbh = $self->
if ( !$dbh || !$dbh->ping() ) {
eval { $dbh = $self->
if ( $EVAL_ERROR ) {
#$oktorun = 0; # flag for cleanup tasks
chomp $EVAL_ERROR;
die "Lost connection to " . $self->
. "replica lag ($EVAL_ERROR)\n";
}
}
$dbh->do("SELECT 'pt-online-
sleep(60);
}
# ===============<new code end>===
}
PTDEBUG && _d('Done nibbling');
if ( my $callback = $self->
$callback-
}
description: | updated |
description: | updated |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Is there any update?
please consider this case. we finished internal test also we found the keep alive neccesarily otherwise, it is terminated.
we think that we need your code review for double check.
please consider this scenario : service` .`big_mark_ usr_dvce_ ota`: 0% 2+08:27:46 remain
2016-08-17T08:55:03 Creating triggers...
2016-08-17T08:55:03 Created triggers OK.
2016-08-17T08:55:03 Copying approximately 125366439 rows...
Copying `store_