Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1108613-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 545
Proposed branch: lp:~laurynas-biveinis/percona-server/BT-16274-bug1108613-5.1
Merge into: lp:percona-server/5.1
Prerequisite: lp:~laurynas-biveinis/percona-server/BT-16274-bug1083669-5.1
Diff against target: 128 lines (+67/-6)
6 files modified
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result (+13/-1)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt (+1/-1)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test (+40/-1)
Percona-Server/storage/innodb_plugin/log/log0log.c (+4/-1)
Percona-Server/storage/innodb_plugin/log/log0online.c (+4/-2)
Percona-Server/storage/innodb_plugin/srv/srv0start.c (+5/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1108613-5.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
George Ormond Lorch III (community) g2 Approve
Review via email: mp+146591@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Please ignore diff lines 38--63 and srv0start.c, or better yet, review the commit 523. The MP diff contains extra changes because I can set only one prerequisite branch.

Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Laurynas, can you offer some detail how to recover from this situation if/when it occurs? If this happens I assume that the next attempt at an incremental backup will use a slow incremental. Is there any possibility of a race between XB and PS from the point of detecting srv_track_changed_pages=TRUE, hitting this error, which stops change tracking, then XB attempting to access/use the bitmap which is no longer being updated?

review: Needs Information (g2)
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Discussion on the 5.5 MP.

Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Please see 5.5 review for discussion on recovery.

review: Approve (g2)
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result'
2--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2013-01-31 11:33:39 +0000
3+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2013-02-05 09:48:22 +0000
4@@ -41,4 +41,16 @@
5 ib_modified_log_1
6 ib_modified_log_2
7 7th restart
8-DROP TABLE t1, t2;
9+ib_modified_log_1
10+ib_modified_log_2
11+ib_modified_log_3
12+8th restart
13+RESET CHANGED_PAGE_BITMAPS;
14+call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*");
15+9th restart
16+CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=InnoDB;
17+call mtr.add_suppression("InnoDB: Error: the age of the oldest untracked record exceeds the log group capacity!");
18+call mtr.add_suppression("InnoDB: Error: stopping the log tracking thread at LSN");
19+INSERT INTO t3 VALUES (REPEAT('a', 12582912));
20+10th restart
21+DROP TABLE t1, t2, t3;
22
23=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt'
24--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt 2013-01-31 11:33:39 +0000
25+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt 2013-02-05 09:48:22 +0000
26@@ -1,1 +1,1 @@
27---innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table
28+--innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table --max_allowed_packet=13631488
29
30=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test'
31--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2013-01-31 11:33:39 +0000
32+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2013-02-05 09:48:22 +0000
33@@ -195,4 +195,43 @@
34 --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
35 --source include/wait_until_connected_again.inc
36
37-DROP TABLE t1, t2;
38+# TODO: check the tracked LSN range continuity once this info is exposed through
39+# INFORMATION_SCHEMA.
40+
41+file_exists $BITMAP_FILE;
42+--replace_regex /_[[:digit:]]+\.xdb$//
43+list_files $MYSQLD_DATADIR ib_modified_log*;
44+
45+#
46+# Test for log tracking compatibility with innodb_force_recovery (bug 1083596).
47+#
48+
49+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
50+--shutdown_server 10
51+--source include/wait_until_disconnected.inc
52+--enable_reconnect
53+--echo 8th restart
54+--exec echo "restart:--innodb-force-recovery=6" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
55+--source include/wait_until_connected_again.inc
56+
57+# innodb_force_recovery desyncs bitmap data and logs
58+RESET CHANGED_PAGE_BITMAPS;
59+
60+call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*");
61+--echo 9th restart
62+--source include/restart_mysqld.inc
63+
64+#
65+# Test that impossible to track log is handled gracefully (bug 1108613)
66+#
67+CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=InnoDB;
68+
69+call mtr.add_suppression("InnoDB: Error: the age of the oldest untracked record exceeds the log group capacity!");
70+call mtr.add_suppression("InnoDB: Error: stopping the log tracking thread at LSN");
71+
72+INSERT INTO t3 VALUES (REPEAT('a', 12582912));
73+
74+--echo 10th restart
75+--source include/restart_mysqld.inc
76+
77+DROP TABLE t1, t2, t3;
78
79=== modified file 'Percona-Server/storage/innodb_plugin/log/log0log.c'
80--- Percona-Server/storage/innodb_plugin/log/log0log.c 2013-01-04 07:28:01 +0000
81+++ Percona-Server/storage/innodb_plugin/log/log0log.c 2013-02-05 09:48:22 +0000
82@@ -479,9 +479,12 @@
83
84 if (tracked_lsn_age >= log->log_group_capacity) {
85
86- fprintf(stderr, " InnoDB: Error: the age of the "
87+ fprintf(stderr, "InnoDB: Error: the age of the "
88 "oldest untracked record exceeds the log "
89 "group capacity!\n");
90+ fprintf(stderr, "InnoDB: Error: stopping the log "
91+ "tracking thread at LSN %llu\n", tracked_lsn);
92+ srv_track_changed_pages = FALSE;
93 }
94 }
95
96
97=== modified file 'Percona-Server/storage/innodb_plugin/log/log0online.c'
98--- Percona-Server/storage/innodb_plugin/log/log0online.c 2013-02-05 09:48:21 +0000
99+++ Percona-Server/storage/innodb_plugin/log/log0online.c 2013-02-05 09:48:22 +0000
100@@ -408,8 +408,10 @@
101
102 if (last_tracked_lsn > tracking_start_lsn) {
103 fprintf(stderr,
104- "InnoDB: Error: last tracked LSN is in future. This "
105- "can be caused by mismatched bitmap files.\n");
106+ "InnoDB: Error: last tracked LSN %llu is ahead of "
107+ "tracking start LSN %llu. This can be caused by "
108+ "mismatched bitmap files.\n", last_tracked_lsn,
109+ tracking_start_lsn);
110 exit(1);
111 }
112
113
114=== modified file 'Percona-Server/storage/innodb_plugin/srv/srv0start.c'
115--- Percona-Server/storage/innodb_plugin/srv/srv0start.c 2012-11-25 09:29:43 +0000
116+++ Percona-Server/storage/innodb_plugin/srv/srv0start.c 2013-02-05 09:48:22 +0000
117@@ -1126,6 +1126,11 @@
118 init_log_online(void)
119 /*=================*/
120 {
121+ if (UNIV_UNLIKELY(srv_force_recovery > 0)) {
122+ srv_track_changed_pages = FALSE;
123+ return;
124+ }
125+
126 if (srv_track_changed_pages) {
127
128 log_online_read_init();

Subscribers

People subscribed via source and target branches