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
1=== modified file 'bin/pt-heartbeat'
2--- bin/pt-heartbeat 2013-06-25 22:32:19 +0000
3+++ bin/pt-heartbeat 2013-06-28 18:17:28 +0000
4@@ -5688,6 +5688,10 @@
5 The heartbeat table requires at least one row. If you manually create the
6 heartbeat table, then you must insert a row by doing:
7
8+ INSERT INTO heartbeat (ts, server_id) VALUES (NOW(), N);
9+
10+or if using L<"--utc">:
11+
12 INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);
13
14 where C<N> is the server's ID; do not use @@server_id because it will replicate
15@@ -5706,6 +5710,10 @@
16 of a multi-slave hierarchy like "master -> slave1 -> slave2".
17 To manually insert the one required row into a legacy table:
18
19+ INSERT INTO heartbeat (id, ts) VALUES (1, NOW());
20+
21+or if using L<"--utc">:
22+
23 INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());
24
25 The tool automatically detects if the heartbeat table is legacy.
26@@ -6003,9 +6011,14 @@
27 not check or adjust for different system or MySQL time zones which can
28 cause the tool to compute the lag incorrectly. Specifying this option is
29 a good idea because it ensures that the tool works correctly regardless of
30-time zones, but it also makes the tool backwards-incompatible with
31-pt-heartbeat 2.2.3 and older (unless the older version of pt-heartbeat
32-is running on a system that uses UTC).
33+time zones.
34+
35+If used, this option must be used for all pt-heartbeat instances:
36+L<"--update">, L<"--monitor">, L<"--check">, etc. You should probably
37+set the option in a L<"--config"> file. Mixing this option with pt-heartbeat
38+instances not using this option will cause false-positive lag readings
39+due to different time zones (unless all your systems are set to use UTC,
40+in which case this option isn't required).
41
42 =item --version
43

Subscribers

People subscribed via source and target branches

to all changes: