Merge lp:~vlad-lesin/percona-server/5.6-xtrabackup-apply-logs-fixes into lp:percona-server/5.6

Proposed by Vlad Lesin on 2013-04-25
Status: Merged
Approved by: Alexey Kopytov on 2013-05-08
Approved revision: 342
Merged at revision: 345
Proposed branch: lp:~vlad-lesin/percona-server/5.6-xtrabackup-apply-logs-fixes
Merge into: lp:percona-server/5.6
Diff against target: 32 lines (+8/-2)
2 files modified
Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test (+1/-1)
Percona-Server/storage/innobase/srv/srv0start.cc (+7/-1)
To merge this branch: bzr merge lp:~vlad-lesin/percona-server/5.6-xtrabackup-apply-logs-fixes
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2013-04-25 Approve on 2013-05-08
Laurynas Biveinis (community) Needs Information on 2013-04-25
Review via email: mp+160800@code.launchpad.net

Description of the change

See commit comments and related bug description.

To post a comment you must log in.

Is there a Jenkins run? (this is not a review)

review: Needs Information
Alexey Kopytov (akopytov) wrote :

Hi Laurynas,

On Thu, 25 Apr 2013 23:58:23 -0000, Laurynas Biveinis wrote:
> Review: Needs Information
>
> Is there a Jenkins run? (this is not a review)
>

Well, this is not a real MP either :) Was created for preview purposes
for me to take a look.

Alexey Kopytov (akopytov) wrote :

I think a more correct fix would be to do:

max_flushed_lsn = log_get_lsn();
fil_write_flushed_lsn_to_data_files(max_flushed_lsn, 0);
fil_flush_file_spaces(FIL_TABLESPACE);

before calling create_log_files_rename() in case the log files are being resized.

Other calls of create_log_files_rename() don't need that, so doing it unconditionally inside create_log_files_rename() does not look right.

I'd also add a comment in that code explaining that create_log_files() can increase system LSN, so we have to update FIL_PAGE_FILE_FLUSH_LSN in data files.

Please also add the bug # reference and fix typos in revision comments before resubmitting.

review: Needs Fixing
Vlad Lesin (vlad-lesin) wrote :

> Other calls of create_log_files_rename() don't need that, so doing it
> unconditionally inside create_log_files_rename() does not look right.
>
> I'd also add a comment in that code explaining that create_log_files() can
> increase system LSN, so we have to update FIL_PAGE_FILE_FLUSH_LSN in data
> files.
>
> Please also add the bug # reference and fix typos in revision comments before
> resubmitting.

Done. Waiting for jenkins testing results.

Vlad Lesin (vlad-lesin) wrote :

> Is there a Jenkins run? (this is not a review)
Yes. I have seen failed tests and they don't have any concern to my fixes.

http://jenkins.percona.com/view/PS 5.6/job/percona-server-5.6-param/82

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 'Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test'
2--- Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test 2012-10-01 07:34:50 +0000
3+++ Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test 2013-05-05 01:52:27 +0000
4@@ -94,7 +94,7 @@
5 --exec $MYSQLD_CMD $args --innodb-read-only
6 let SEARCH_PATTERN= InnoDB: Recovery skipped, --innodb-read-only set!;
7 --source include/search_pattern_in_file.inc
8-let SEARCH_PATTERN= InnoDB: Can.t initiate database recovery, running in read-only-mode;
9+let SEARCH_PATTERN= InnoDB: Cannot resize log files in read-only mode;
10 --source include/search_pattern_in_file.inc
11 --remove_file $SEARCH_FILE
12
13
14=== modified file 'Percona-Server/storage/innobase/srv/srv0start.cc'
15--- Percona-Server/storage/innobase/srv/srv0start.cc 2013-03-31 06:08:39 +0000
16+++ Percona-Server/storage/innobase/srv/srv0start.cc 2013-05-05 01:52:27 +0000
17@@ -2422,8 +2422,14 @@
18 return(err);
19 }
20
21+ /* create_log_files() can increase system lsn that is
22+ why FIL_PAGE_FILE_FLUSH_LSN have to be updated */
23+ min_flushed_lsn = max_flushed_lsn = log_get_lsn();
24+ fil_write_flushed_lsn_to_data_files(min_flushed_lsn, 0);
25+ fil_flush_file_spaces(FIL_TABLESPACE);
26+
27 create_log_files_rename(logfilename, dirnamelen,
28- max_flushed_lsn, logfile0);
29+ log_get_lsn(), logfile0);
30 }
31
32 srv_startup_is_before_trx_rollback_phase = FALSE;

Subscribers

People subscribed via source and target branches