Merge lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556-2.1 into lp:percona-toolkit/2.1

Proposed by Daniel Nichter
Status: Merged
Merged at revision: 536
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556-2.1
Merge into: lp:percona-toolkit/2.1
Diff against target: 42 lines (+16/-3)
1 file modified
bin/pt-heartbeat (+16/-3)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556-2.1
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+172122@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/pt-heartbeat'
--- bin/pt-heartbeat 2013-04-04 23:25:33 +0000
+++ bin/pt-heartbeat 2013-06-28 18:17:30 +0000
@@ -5576,6 +5576,10 @@
5576The heartbeat table requires at least one row. If you manually create the5576The heartbeat table requires at least one row. If you manually create the
5577heartbeat table, then you must insert a row by doing:5577heartbeat table, then you must insert a row by doing:
55785578
5579 INSERT INTO heartbeat (ts, server_id) VALUES (NOW(), N);
5580
5581or if using L<"--utc">:
5582
5579 INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);5583 INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);
55805584
5581where C<N> is the server's ID; do not use @@server_id because it will replicate5585where C<N> is the server's ID; do not use @@server_id because it will replicate
@@ -5594,6 +5598,10 @@
5594of a multi-slave hierarchy like "master -> slave1 -> slave2".5598of a multi-slave hierarchy like "master -> slave1 -> slave2".
5595To manually insert the one required row into a legacy table:5599To manually insert the one required row into a legacy table:
55965600
5601 INSERT INTO heartbeat (id, ts) VALUES (1, NOW());
5602
5603or if using L<"--utc">:
5604
5597 INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());5605 INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());
55985606
5599The tool automatically detects if the heartbeat table is legacy.5607The tool automatically detects if the heartbeat table is legacy.
@@ -5879,9 +5887,14 @@
5879not check or adjust for different system or MySQL time zones which can5887not check or adjust for different system or MySQL time zones which can
5880cause the tool to compute the lag incorrectly. Specifying this option is5888cause the tool to compute the lag incorrectly. Specifying this option is
5881a good idea because it ensures that the tool works correctly regardless of5889a good idea because it ensures that the tool works correctly regardless of
5882time zones, but it also makes the tool backwards-incompatible with5890time zones.
5883pt-heartbeat 2.1.9 and older (unless the older version of pt-heartbeat5891
5884is running on a system that uses UTC).5892If used, this option must be used for all pt-heartbeat instances:
5893L<"--update">, L<"--monitor">, L<"--check">, etc. You should probably
5894set the option in a L<"--config"> file. Mixing this option with pt-heartbeat
5895instances not using this option will cause false-positive lag readings
5896due to different time zones (unless all your systems are set to use UTC,
5897in which case this option isn't required).
58855898
5886=item --version5899=item --version
58875900

Subscribers

People subscribed via source and target branches