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

Proposed by Daniel Nichter
Status: Merged
Merged at revision: 599
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556
Merge into: lp:~percona-toolkit-dev/percona-toolkit/release-2.2.4
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
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+172121@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-06-25 22:32:19 +0000
+++ bin/pt-heartbeat 2013-06-28 18:17:28 +0000
@@ -5688,6 +5688,10 @@
5688The heartbeat table requires at least one row. If you manually create the5688The heartbeat table requires at least one row. If you manually create the
5689heartbeat table, then you must insert a row by doing:5689heartbeat table, then you must insert a row by doing:
56905690
5691 INSERT INTO heartbeat (ts, server_id) VALUES (NOW(), N);
5692
5693or if using L<"--utc">:
5694
5691 INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);5695 INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);
56925696
5693where C<N> is the server's ID; do not use @@server_id because it will replicate5697where C<N> is the server's ID; do not use @@server_id because it will replicate
@@ -5706,6 +5710,10 @@
5706of a multi-slave hierarchy like "master -> slave1 -> slave2".5710of a multi-slave hierarchy like "master -> slave1 -> slave2".
5707To manually insert the one required row into a legacy table:5711To manually insert the one required row into a legacy table:
57085712
5713 INSERT INTO heartbeat (id, ts) VALUES (1, NOW());
5714
5715or if using L<"--utc">:
5716
5709 INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());5717 INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());
57105718
5711The tool automatically detects if the heartbeat table is legacy.5719The tool automatically detects if the heartbeat table is legacy.
@@ -6003,9 +6011,14 @@
6003not check or adjust for different system or MySQL time zones which can6011not check or adjust for different system or MySQL time zones which can
6004cause the tool to compute the lag incorrectly. Specifying this option is6012cause the tool to compute the lag incorrectly. Specifying this option is
6005a good idea because it ensures that the tool works correctly regardless of6013a good idea because it ensures that the tool works correctly regardless of
6006time zones, but it also makes the tool backwards-incompatible with6014time zones.
6007pt-heartbeat 2.2.3 and older (unless the older version of pt-heartbeat6015
6008is running on a system that uses UTC).6016If used, this option must be used for all pt-heartbeat instances:
6017L<"--update">, L<"--monitor">, L<"--check">, etc. You should probably
6018set the option in a L<"--config"> file. Mixing this option with pt-heartbeat
6019instances not using this option will cause false-positive lag readings
6020due to different time zones (unless all your systems are set to use UTC,
6021in which case this option isn't required).
60096022
6010=item --version6023=item --version
60116024

Subscribers

People subscribed via source and target branches

to all changes: