Merge lp:~percona-toolkit-dev/percona-toolkit/pt-table-checksum-deadlock-1287253 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.10

Proposed by Frank Cizmich
Status: Merged
Approved by: Daniel Nichter
Approved revision: 620
Merged at revision: 610
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/pt-table-checksum-deadlock-1287253
Merge into: lp:~percona-toolkit-dev/percona-toolkit/release-2.2.10
Diff against target: 75 lines (+8/-6)
5 files modified
bin/pt-table-checksum (+4/-2)
t/pt-table-checksum/samples/default-results-5.5.txt (+1/-1)
t/pt-table-checksum/samples/default-results-5.6.txt (+1/-1)
t/pt-table-checksum/samples/static-chunk-size-results-5.5.txt (+1/-1)
t/pt-table-checksum/samples/static-chunk-size-results-5.6.txt (+1/-1)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-table-checksum-deadlock-1287253
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+228745@code.launchpad.net

Description of the change

Simply adds "deadlock" to the set of errors that can be retried a few times if encountered

To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

s/Deadlock found when trying to get lock/Deadlock found/ because matching error text is already a bad practice (we should match error codes) but we do it anyway, so is better to match minimal meaningful info in case the wording of the error in MySQL or DBD::mysql changes. Also, this makes it consistent with pt-osc.

review: Needs Fixing
620. By Frank Cizmich

minimized error string match to favour compatibility

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-table-checksum'
2--- bin/pt-table-checksum 2014-07-04 17:16:08 +0000
3+++ bin/pt-table-checksum 2014-07-30 16:25:22 +0000
4@@ -10561,6 +10561,7 @@
5
6 if ( $error =~ m/Lock wait timeout exceeded/
7 || $error =~ m/Query execution was interrupted/
8+ || $error =~ m/Deadlock found/
9 ) {
10 # These errors/warnings can be retried, so don't print
11 # a warning yet; do that in final_fail.
12@@ -10584,8 +10585,9 @@
13 my (%args) = @_;
14 my $error = $args{error};
15
16- if ( $error =~ /Lock wait timeout exceeded/
17- || $error =~ /Query execution was interrupted/
18+ if ( $error =~ m/Lock wait timeout exceeded/
19+ || $error =~ m/Query execution was interrupted/
20+ || $error =~ m/Deadlock found/
21 ) {
22 # These errors/warnings are not fatal but only cause this
23 # nibble to be skipped.
24
25=== modified file 't/pt-table-checksum/samples/default-results-5.5.txt'
26--- t/pt-table-checksum/samples/default-results-5.5.txt 2013-02-19 01:51:14 +0000
27+++ t/pt-table-checksum/samples/default-results-5.5.txt 2014-07-30 16:25:22 +0000
28@@ -21,7 +21,7 @@
29 0 0 0 0 mysql.time_zone_transition
30 0 0 0 0 mysql.time_zone_transition_type
31 0 0 2 0 mysql.user
32-0 0 38 0 percona_test.checksums
33+0 0 22 0 percona_test.checksums
34 0 0 1 0 percona_test.load_data
35 0 0 1 0 percona_test.sentinel
36 0 0 200 0 sakila.actor
37
38=== modified file 't/pt-table-checksum/samples/default-results-5.6.txt'
39--- t/pt-table-checksum/samples/default-results-5.6.txt 2013-02-19 01:51:44 +0000
40+++ t/pt-table-checksum/samples/default-results-5.6.txt 2014-07-30 16:25:22 +0000
41@@ -20,7 +20,7 @@
42 0 0 0 0 mysql.time_zone_transition
43 0 0 0 0 mysql.time_zone_transition_type
44 0 0 2 0 mysql.user
45-0 0 37 0 percona_test.checksums
46+0 0 22 0 percona_test.checksums
47 0 0 1 0 percona_test.load_data
48 0 0 1 0 percona_test.sentinel
49 0 0 200 0 sakila.actor
50
51=== modified file 't/pt-table-checksum/samples/static-chunk-size-results-5.5.txt'
52--- t/pt-table-checksum/samples/static-chunk-size-results-5.5.txt 2013-02-19 01:51:14 +0000
53+++ t/pt-table-checksum/samples/static-chunk-size-results-5.5.txt 2014-07-30 16:25:22 +0000
54@@ -21,7 +21,7 @@
55 0 0 0 1 0 mysql.time_zone_transition
56 0 0 0 1 0 mysql.time_zone_transition_type
57 0 0 2 1 0 mysql.user
58-0 0 38 1 0 percona_test.checksums
59+0 0 22 1 0 percona_test.checksums
60 0 0 1 1 0 percona_test.load_data
61 0 0 1 1 0 percona_test.sentinel
62 0 0 200 1 0 sakila.actor
63
64=== modified file 't/pt-table-checksum/samples/static-chunk-size-results-5.6.txt'
65--- t/pt-table-checksum/samples/static-chunk-size-results-5.6.txt 2013-02-19 01:51:44 +0000
66+++ t/pt-table-checksum/samples/static-chunk-size-results-5.6.txt 2014-07-30 16:25:22 +0000
67@@ -20,7 +20,7 @@
68 0 0 0 1 0 mysql.time_zone_transition
69 0 0 0 1 0 mysql.time_zone_transition_type
70 0 0 2 1 0 mysql.user
71-0 0 37 1 0 percona_test.checksums
72+0 0 22 1 0 percona_test.checksums
73 0 0 1 1 0 percona_test.load_data
74 0 0 1 1 0 percona_test.sentinel
75 0 0 200 1 0 sakila.actor

Subscribers

People subscribed via source and target branches

to all changes: