Update documentation and/or implentation of pt-archiver --check-interval
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Frank Cizmich |
Bug Description
"--check-interval" is not how often you check the lag as the name
indicates, but once there is a lag, how long it sleeps. This conclusion is
based on examining the code:
if ( $lag_dbh ) {
my $lag = $ms->get_
while ( !defined $lag || $lag > $o->get('max-lag') ) {
PTDEBUG && _d('Sleeping: slave lag is', $lag);
*sleep(
$lag = $ms->get_
}
}
The documentation is incorrect:
--check-interval
type: time; default: 1s
*How often to check for slave lag if "--check-slave-lag" is
given.*
and inconsistent:
--max-lag
type: time; default: 1s
Pause archiving if the slave given by "--check-slave-lag" lags.
This option causes pt-archiver to look at the slave every
time it's about to fetch another row. If the slave's lag
is greater than the option's value, or if the slave isn't
running (so its lag is NULL), *pt-table-checksum sleeps for*
* "--check-interval" seconds and then looks at the lag again.*
It repeats until the slave is caught up, then proceeds to
fetch and archive the row.
To recap:
1. Have the man page fixed regarding the --*check-
name indicates it is check-interval but in reality it is
*"sleep-interval" *inside
the code.
2. To have the code patched so there is a real *check-interval* and
*sleep-interval.*
tags: | added: pt-archiver |
Changed in percona-toolkit: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.3.1 |
Changed in percona-toolkit: | |
milestone: | 2.3.1 → none |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.2.15 |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Another thing to fix, that the developer has ACKed is that the tool check the replication lag for every row fetched. This is inefficient and should be corrected.