Merge lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1239728 into lp:percona-xtrabackup/2.2

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4883
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1239728
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 27 lines (+7/-0)
1 file modified
xtrabackup/innobackupex (+7/-0)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1239728
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+192220@code.launchpad.net

Description of the change

Added synchronization between child thread which supposed to kill queries and parent thread, so parent will not kill child until last finished initialization.

http://jenkins.percona.com/job/percona-xtrabackup-2.2-param/23/

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'xtrabackup/innobackupex'
2--- xtrabackup/innobackupex 2013-09-26 06:26:18 +0000
3+++ xtrabackup/innobackupex 2013-10-22 18:53:17 +0000
4@@ -3307,6 +3307,7 @@
5 local $SIG{HUP} = sub { $end = 1 };
6
7 $pcon->{dbh}->{InactiveDestroy} = 1;
8+ kill('USR1', $innobackupex_pid);
9
10 sleep($kill_timeout);
11
12@@ -3348,9 +3349,15 @@
13 $now = current_time();
14 print STDERR "$now $prefix Starting to lock all tables...\n";
15
16+ my $query_killer_init = 0;
17+
18 # start query killer process
19 if ($option_kill_long_queries_timeout) {
20+ local $SIG{'USR1'} = sub { $query_killer_init = 1 };
21 start_query_killer($option_kill_long_queries_timeout, $con);
22+ while (!$query_killer_init) {
23+ usleep(1);
24+ }
25 }
26 if (compare_versions($mysql_server_version, '4.0.22') == 0
27 || compare_versions($mysql_server_version, '4.1.7') == 0) {

Subscribers

People subscribed via source and target branches