Merge lp:~akopytov/percona-xtrabackup/bug1320441-2.1 into lp:percona-xtrabackup/2.1

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 749
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1320441-2.1
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 78 lines (+28/-12)
1 file modified
innobackupex.pl (+28/-12)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1320441-2.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+222176@code.launchpad.net

Description of the change

    Bug #1320441: Disable causal reads with FTWRL + galera-info

    innobackupex now sets wsrep_causal_reads to 0 before executing FTWRL if
    the server is a member of the Galera cluster.

http://jenkins.percona.com/view/PXB%202.1/job/percona-xtrabackup-2.1-param/574/

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 'innobackupex.pl'
2--- innobackupex.pl 2014-04-29 13:56:43 +0000
3+++ innobackupex.pl 2014-06-05 11:59:18 +0000
4@@ -75,6 +75,7 @@
5 # Server capabilities #
6 #######################
7 my $have_changed_page_bitmaps = 0;
8+my $have_galera_enabled = 0;
9
10 # command line options
11 my $option_help = '';
12@@ -1916,9 +1917,7 @@
13 my $buffer_pool_filename = get_option(\%config, $option_defaults_group,
14 'innodb_buffer_pool_filename');
15
16- if ($option_incremental) {
17- detect_mysql_capabilities_for_backup(\%mysql);
18- }
19+ detect_mysql_capabilities_for_backup(\%mysql);
20
21 # start ibbackup as a child process
22 start_ibbackup();
23@@ -3101,12 +3100,7 @@
24 if (!defined($state_uuid) || !defined($last_committed)) {
25 my $now = current_time();
26
27- print STDERR "$now $prefix Failed to get master wsrep state " .
28- "from SHOW STATUS\n";
29- print STDERR "$now $prefix This means that the server is not a " .
30- "member of a cluster. Ignoring the --galera-info option\n";
31-
32- return;
33+ die "Failed to get master wsrep state from SHOW STATUS.";
34 }
35
36 write_to_backup_file("$galera_info", "$state_uuid" .
37@@ -3377,6 +3371,10 @@
38 }
39 }
40
41+ if ($have_galera_enabled) {
42+ mysql_query($con, "SET SESSION wsrep_causal_reads=0");
43+ }
44+
45 mysql_query($con, "FLUSH TABLES WITH READ LOCK");
46
47 # stop query killer process
48@@ -4815,9 +4813,27 @@
49 # Query the server to find out what backup capabilities it supports.
50 #
51 sub detect_mysql_capabilities_for_backup {
52- $have_changed_page_bitmaps =
53- mysql_query($_[0], "SELECT COUNT(*) FROM INFORMATION_SCHEMA.PLUGINS ".
54- "WHERE PLUGIN_NAME LIKE 'INNODB_CHANGED_PAGES'");
55+ if ($option_incremental) {
56+ $have_changed_page_bitmaps =
57+ mysql_query($_[0], "SELECT COUNT(*) FROM " .
58+ "INFORMATION_SCHEMA.PLUGINS " .
59+ "WHERE PLUGIN_NAME LIKE 'INNODB_CHANGED_PAGES'");
60+ }
61+
62+ if (!defined($_[0]->{vars})) {
63+ get_mysql_vars($_[0]);
64+ }
65+ $have_galera_enabled = defined($_[0]->{vars}->{wsrep_on});
66+
67+ if ($option_galera_info && !$have_galera_enabled) {
68+ my $now = current_time();
69+
70+ print STDERR "$now $prefix --galera-info is specified on the command " .
71+ "line, but the server does not support Galera replication. " .
72+ "Ignoring the option.";
73+
74+ $option_galera_info = 0;
75+ }
76 }
77
78 =pod

Subscribers

People subscribed via source and target branches

to all changes: