Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
InnoDB holds dict_sys mutex while doing file i/o operation during creation of table.
In fil_ibd_create():
if (ulint zip_size = fil_space_t::zip_size(flags)) {
|
page_zip_des_t page_zip;
|
page_zip_set_size(&page_zip, zip_size);
|
page_zip.data = page + srv_page_size;
|
#ifdef UNIV_DEBUG
|
page_zip.m_start = 0;
|
#endif /* UNIV_DEBUG */
|
page_zip.m_end = 0;
|
page_zip.m_nonempty = 0;
|
page_zip.n_blobs = 0;
|
|
buf_flush_init_for_writing(NULL, page, &page_zip, false);
|
|
*err = os_file_write(IORequestWrite, path, file,
|
page_zip.data, 0, zip_size);
|
} else {
|
buf_flush_init_for_writing(NULL, page, NULL,
|
fil_space_t::full_crc32(flags));
|
|
*err = os_file_write(IORequestWrite, path, file,
|
page, 0, srv_page_size);
|
}
|
|
if (!os_file_flush(file)) {
|
ib::error() << "File flush of tablespace '"
|
<< path << "' failed";
|
*err = DB_ERROR;
|
goto err_exit;
|
}
|
If we remove the page0 write and flushing the file then InnoDB should handle this scenario during recovery. Right now, InnoDB does the validation of page0 while parsing the FILE redo log records.
InnoDB should defer these tablespace as uninitialized if it encounters zero-filled page 0
and recover page0 of these tablespace before recovering any other pages of these tablespace. This is the idea right now. It could change when we're debuggging encrypted and compressed tablespace.
Attachments
Issue Links
- blocks
-
MDEV-14481 Execute InnoDB crash recovery in the background
- Closed
-
MDEV-25646 Atomic DDL: InnoDB: Datafile './test/<tablename>.ibd' is corrupted. Cannot determine the space ID from the first 64 pages
- Closed
- causes
-
MDEV-25967 Server restarted on backupped data crashes during CHECK TABLE
- Closed
-
MDEV-26326 MDEV-24626 (remove synchronous page0 write) seems to cause mariabackup to skip valid ibd file.
- Closed
-
MDEV-27817 InnoDB recovery of recently created files is not crash-safe
- Closed
-
MDEV-28923 atomic.rename_table occasionally fails
- Closed
-
MDEV-28974 mariadb-backup --prepare fails to prepare a backup that involves DDL
- Closed
-
MDEV-28977 Race condition in the recovery of CREATE TABLE or table-rebuilding DDL
- Closed
-
MDEV-30069 InnoDB: Trying to write ... bytes at ... outside the bounds of the file ...
- Closed
-
MDEV-31098 InnoDB Recovery doesn't display encryption message when no encryption configuration passed
- Closed
- relates to
-
MDEV-25655 Atomic DDL: InnoDB: Cannot replay rename of tablespace, error Data structure corruption
- Closed
-
MDEV-25665 safe_mutex: Trying to lock mutex ... fil0fil.cc ... when the mutex was already locked log0recv.cc
- Closed
-
MDEV-25852 Orphan #sql*.ibd files are occasionally left behind after killed ALTER TABLE
- Closed
-
MDEV-25909 Unnecessary calls to fil_ibd_load() slow down recovery
- Open
-
MDEV-26326 MDEV-24626 (remove synchronous page0 write) seems to cause mariabackup to skip valid ibd file.
- Closed
-
MDEV-26631 Race condition in the test innodb.doublewrite
- Closed
-
MDEV-28870 InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY before FILE_CHECKPOINT during crash recovery
- Closed
-
MDEV-29987 Bogus errors about file size in the test mariabackup.defer_space
- Closed
-
MDEV-30132 Crash after recovery, with InnoDB: Tried to read ... bytes at offset
- Closed
-
MDEV-32939 If tables are frequently created, renamed, dropped, a backup cannot be restored
- Closed
-
MDEV-18200 MariaBackup full backup failed with InnoDB: Failing assertion: success in storage/innobase/fil/fil0fil.cc line 657
- Closed
-
MDEV-25656 Atomic DDL: Assertion `!full_crc32(flags)' failed in fil_space_t::logical_size(ulint)
- Closed
-
MDEV-25657 Atomic DDL: InnoDB: Cannot apply log, double free or corruption (fasttop)
- Closed
-
MDEV-26001 InnoDB: Cannot apply log to [page id: space=152, page number=0] of corrupted file
- Closed