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

Proposed by Vlad Lesin
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
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) Approve
Laurynas Biveinis (community) Needs Information
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.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

review: Needs Information
Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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

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
=== modified file 'Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test'
--- Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test 2012-10-01 07:34:50 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/innodb-log-file-size.test 2013-05-05 01:52:27 +0000
@@ -94,7 +94,7 @@
94--exec $MYSQLD_CMD $args --innodb-read-only94--exec $MYSQLD_CMD $args --innodb-read-only
95let SEARCH_PATTERN= InnoDB: Recovery skipped, --innodb-read-only set!;95let SEARCH_PATTERN= InnoDB: Recovery skipped, --innodb-read-only set!;
96--source include/search_pattern_in_file.inc96--source include/search_pattern_in_file.inc
97let SEARCH_PATTERN= InnoDB: Can.t initiate database recovery, running in read-only-mode;97let SEARCH_PATTERN= InnoDB: Cannot resize log files in read-only mode;
98--source include/search_pattern_in_file.inc98--source include/search_pattern_in_file.inc
99--remove_file $SEARCH_FILE99--remove_file $SEARCH_FILE
100100
101101
=== modified file 'Percona-Server/storage/innobase/srv/srv0start.cc'
--- Percona-Server/storage/innobase/srv/srv0start.cc 2013-03-31 06:08:39 +0000
+++ Percona-Server/storage/innobase/srv/srv0start.cc 2013-05-05 01:52:27 +0000
@@ -2422,8 +2422,14 @@
2422 return(err);2422 return(err);
2423 }2423 }
24242424
2425 /* create_log_files() can increase system lsn that is
2426 why FIL_PAGE_FILE_FLUSH_LSN have to be updated */
2427 min_flushed_lsn = max_flushed_lsn = log_get_lsn();
2428 fil_write_flushed_lsn_to_data_files(min_flushed_lsn, 0);
2429 fil_flush_file_spaces(FIL_TABLESPACE);
2430
2425 create_log_files_rename(logfilename, dirnamelen,2431 create_log_files_rename(logfilename, dirnamelen,
2426 max_flushed_lsn, logfile0);2432 log_get_lsn(), logfile0);
2427 }2433 }
24282434
2429 srv_startup_is_before_trx_rollback_phase = FALSE;2435 srv_startup_is_before_trx_rollback_phase = FALSE;

Subscribers

People subscribed via source and target branches