Merge lp:~laurynas-biveinis/percona-xtrabackup/bug1204075 into lp:percona-xtrabackup/2.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 648
Proposed branch: lp:~laurynas-biveinis/percona-xtrabackup/bug1204075
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 48 lines (+10/-3)
2 files modified
src/changed_page_bitmap.cc (+9/-3)
src/innodb_int.h (+1/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-xtrabackup/bug1204075
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+177382@code.launchpad.net

Description of the change

http://jenkins.percona.com/job/percona-xtrabackup-2.1-param/405/

    Fix bug 1204075 (xb_incremental_bitmap_misc.sh fails in debug xtradb56
    builds | missing bitmap data at the interval start fails "
    bitmap_files->files[0].start_lsn == first_file_start_lsn" assertion).

    The issue is that debug code at the end of
    log_online_setup_bitmap_file_range() attempts too strict a consistency
    check which will fail if the bitmap data is missing at the required
    interval start. Such situation will result in first_file_start_lsn
    keeping its sentinel value, which will differ from the
    bitmap_files->files[0].start_lsn containing the actual lowest start
    LSN of the found bitmap files.

    The missing bitmap data at the interval start is properly diagnosed
    elsewhere in xb_page_bitmap_init(), thus the assert is redundant and
    the fix is to remove it.

    At the same time bring over other changes from Percona Server version
    of log_online_setup_bitmap_file_range(): initialize
    first_file_start_lsn to LSN_MAX instead of 0, and diagnose bitmap file
    directory sanity by returning an error instead of a release build
    assert.

    For LSN_MAX, add a compatibility define in innodb_int.h for 5.1-5.5
    versions.

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 'src/changed_page_bitmap.cc'
2--- src/changed_page_bitmap.cc 2013-04-16 10:35:58 +0000
3+++ src/changed_page_bitmap.cc 2013-07-29 13:52:40 +0000
4@@ -270,7 +270,7 @@
5 os_file_stat_t bitmap_dir_file_info;
6 ulong first_file_seq_num = ULONG_MAX;
7 ulong last_file_seq_num = 0;
8- lsn_t first_file_start_lsn = 0;
9+ lsn_t first_file_start_lsn = LSN_MAX;
10
11 xb_ad(range_end >= range_start);
12
13@@ -378,7 +378,14 @@
14 }
15
16 array_pos = file_seq_num - first_file_seq_num;
17- xb_a(array_pos < bitmap_files->count);
18+ if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {
19+
20+ msg("InnoDB: Error: inconsistent bitmap file "
21+ "directory\n");
22+ free(bitmap_files->files);
23+ return FALSE;
24+ }
25+
26 if (file_seq_num > bitmap_files->files[array_pos].seq_num) {
27
28 bitmap_files->files[array_pos].seq_num = file_seq_num;
29@@ -401,7 +408,6 @@
30
31 #ifdef UNIV_DEBUG
32 ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num);
33- ut_ad(bitmap_files->files[0].start_lsn == first_file_start_lsn);
34
35 for (size_t i = 1; i < bitmap_files->count; i++) {
36 if (!bitmap_files->files[i].seq_num) {
37
38=== modified file 'src/innodb_int.h'
39--- src/innodb_int.h 2013-07-20 14:24:26 +0000
40+++ src/innodb_int.h 2013-07-29 13:52:40 +0000
41@@ -163,6 +163,7 @@
42 # define XB_DICT_SUFFIX_LEN 0
43 # define INT64PF "%lld"
44 # define UINT64PF "%llu"
45+# define LSN_MAX IB_ULONGLONG_MAX
46 # define LSN_PF UINT64PF
47 # define DEFAULT_LOG_FILE_SIZE 5*1024*1024
48 typedef ulint dberr_t;

Subscribers

People subscribed via source and target branches