Merge lp:~laurynas-biveinis/percona-server/atomic-fio-5.5 into lp:percona-server/5.5
Status: | Merged |
---|---|
Approved by: | Stewart Smith |
Approved revision: | no longer in the source branch. |
Merged at revision: | 518 |
Proposed branch: | lp:~laurynas-biveinis/percona-server/atomic-fio-5.5 |
Merge into: | lp:percona-server/5.5 |
Diff against target: |
333 lines (+199/-0) 9 files modified
Percona-Server/mysql-test/r/percona_server_variables_debug.result (+1/-0) Percona-Server/mysql-test/r/percona_server_variables_release.result (+1/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_use_atomic_writes_basic.result (+30/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_use_atomic_writes_basic.test (+29/-0) Percona-Server/storage/innobase/fil/fil0fil.c (+24/-0) Percona-Server/storage/innobase/handler/ha_innodb.cc (+44/-0) Percona-Server/storage/innobase/include/srv0srv.h (+5/-0) Percona-Server/storage/innobase/os/os0file.c (+60/-0) Percona-Server/storage/innobase/srv/srv0srv.c (+5/-0) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-server/atomic-fio-5.5 |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Alexey Kopytov (community) | Approve | ||
Review via email: mp+165202@code.launchpad.net |
This proposal supersedes a proposal from 2013-05-21.
Description of the change
2nd MP:
- all the review comments addressed;
- complete_io label in fil_extend_
Jenkins at http://
Note that while submitted branch is a GCA, the Jenkins-tested one is based on trunk. This is to save a staging test run.
Please review this without a 5.6 MP. That one is ready too, but Jenkins testing is postponed to let the more urgent 5.5 Jenkins jobs proceed.
Implement directFS Fusion I/O atomic writes for 5.5.
https:/
http://
Implement atomic write support for Fusion I/O storage with directFS
file system, implementing blueprint
https:/
This implementation is based on MariaDB implementation at
https:/
- Add new InnoDB global, read-only option innodb_
- If this option is enabled, then at InnoDB initialization disable the
doublewrite buffer if it's enabled and set file flush method to
O_DIRECT if it's not O_DIRECT or ALL_O_DIRECT.
- Add new function os_file_
atomic writes on a specified file descriptor if a Fusion
I/O-specific syscall is available, either fails.
- Call os_file_
if atomic writes are enabled.
- If atomic writes are enabled and posix_fallocate() is available,
then work around a directFS bug that atomic files fail beyond
current EOF by:
- calling os_file_set_size() from fil_extend_
- calling posix_fallocate() in os_file_set_size().
- New variable test sys_vars.
percona_
tests.
Laurynas,
- fil_extend_ space_to_ desired_ size() will not work correctly for a page_no) .
multi-node ibdata1. The existing code extends the last node, but
takes the size of other nodes into account by calculating offsets
as via (start_page_no - file_start_
But the new srv_use_ posix_fallocate code path just extends the last
node to the total desired size regardless of other node sizes,
i.e. overallocate space by always assuming a single-node tablespace.
Minor things (since needs recommitting anyway):
- spurious comment change on lines 324-247
- incorrect function calls formatting ("func (...)"):
+ if (ioctl (file, DFS_IOCTL_ ATOMIC_ WRITE_SET, &atomic_option)) { handle_ error_no_ exit (name, "ioctl"); handle_ error_no_ exit (name, "posix_fallocate");
+ os_file_
+ os_file_
- the following doesn't really have any effect, but the convention use_atomic_ writes:
there is to assign variables to their default values, which is
FALSE for innobase_
+static my_bool innobase_ use_atomic_ writes = TRUE;
which is also inconsistent with:
+UNIV_INTERN ibool srv_use_ atomic_ writes = FALSE;
- and wrong comment formatting:
+ /* Due to a bug in directFS, using atomics needs
+ * posix_fallocate to extend the file
+ * pwrite() past end of the file won't work
+ */