pt-kill custom --group-by
Add a --filter to pt-kill like pt-query-digest --filter that will allow the user to create arbitrary keys in the processlist data struct which they can then --group-by. Sponsored work (14304).
--filter is applied to all processlist queries first, no matter their origin (MySQL or --test-matching) before all the match commands. This means, in theory, a complex --filter could replace all the match commands. Otherwise, --filter has no affect on the match commands (unless it does something weird like delete $event->{Info} and --match-info was specified.) The original code for match commands was not changed, so the addition of --filter should be completely transparent and backwards-
The --filter implementation is identical to that of pt-query-digest. (The code was copy-pasted and tweaked just a little to make it work inside pt-kill.)
Blueprint information
- Status:
- Complete
- Approver:
- Daniel Nichter
- Priority:
- High
- Drafter:
- Daniel Nichter
- Direction:
- Approved
- Assignee:
- Daniel Nichter
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- 2.0.4
- Started by
- Daniel Nichter
- Completed by
- Daniel Nichter