Merge lp:~gryp/percona-toolkit/ptosc-lagwaiter-ptheartbeat into lp:percona-toolkit/2.2
Status: | Superseded |
---|---|
Proposed branch: | lp:~gryp/percona-toolkit/ptosc-lagwaiter-ptheartbeat |
Merge into: | lp:percona-toolkit/2.2 |
Diff against target: |
448 lines (+301/-30) 6 files modified
bin/pt-online-schema-change (+23/-14) bin/pt-table-checksum (+127/-16) t/pt-online-schema-change/plugin.t (+1/-0) t/pt-online-schema-change/samples/plugins/all_hooks.pm (+7/-0) t/pt-table-checksum/plugin.t (+98/-0) t/pt-table-checksum/samples/plugins/all_hooks.pm (+45/-0) |
To merge this branch: | bzr merge lp:~gryp/percona-toolkit/ptosc-lagwaiter-ptheartbeat |
Related bugs: | |
Related blueprints: |
pt-table-checksum --plugin
(Medium)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Pending | ||
Review via email: mp+216863@code.launchpad.net |
This proposal supersedes a proposal from 2014-03-25.
This proposal has been superseded by a proposal from 2014-04-24.
Description of the change
Hi,
This merge request adds 2 features to 2 tools.
First of all, I have added --plugin to pt-table-checksum.
The necessary tests (similar to pt-osc) are added.
Then I have added a new --plugin call for pt-osc named 'get_slave_lag'.
Reason for this development is that a customer (issue #28725) wants to use the official percona toolkit packaged tools while using pt-heartbeat or tungsten to check slavelag. Both pt-osc and pt-tc need to have pt-heartbeat functionality which can be achieved with the --plugin and by overriding the $get_lag subroutine.
I have build an example plugin for both pt-osc and pt-tc in the following github branch: https:/
I tried to do it as compatible as possible.
Implementing pt-heartbeat in the tools itself looked a bit more overkill and I think the plugin is a simple codechange which gives a lot of flexibility. Of course the flexibility means that this is not for novice users.
The changes that Daniel requested were implemented.
Kenny
This will make a good addition to the tool. Thanks for testing it. Before we merge, let's make the following changes:
1. Rename plugin hook to get-slave-lag
2. Rewrite code like:
my $get_lag; >can('get- slave-lag' ) ) { >override_ slavelag_ check(oktorun => \$oktorun);
if ( $plugin && $plugin-
$get_lag = $plugin-
}
else {
$get_lag = sub {...}
}
3. Break the code comments "# The plugin is able"... on/before 80 cols.