Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Do
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL)
Description
The parameter innodb_read_only which first appeared in MySQL 5.6 and MariaDB Server 10.0 disallows startup if the redo log is not logically empty or if the change buffer is not empty.
It is technically possible to apply the needed changes in memory only, without writing them back to the data files. If MariaDB does that, it will be possible to check hot backups in a read-only fashion without any preparatory steps.
Attachments
Issue Links
- includes
-
MDEV-19514 Defer change buffer merge until pages are requested
-
- Closed
-
- is blocked by
-
MDEV-14481 Execute InnoDB crash recovery in the background
-
- Closed
-
- is duplicated by
-
MDEV-13614 Allow --innodb-read-only startup even when change buffer or redo logs are not empty
-
- Closed
-
- relates to
-
MDEV-19176 Do not run out of InnoDB buffer pool during recovery
-
- Closed
-
-
MDEV-11814 Refuse innodb_read_only startup if crash recovery is needed
-
- Closed
-
-
MDEV-12699 Improve crash recovery of corrupted data pages
-
- Closed
-
-
MDEV-14080 InnoDB shutdown sometimes hangs
-
- Closed
-
-
MDEV-15202 innodb.log_file_size failed in buildbot - Can't initiate database recovery, running in read-only-mode
-
- Closed
-
-
MDEV-29694 Remove the InnoDB change buffer
-
- Closed
-
There are several things that slow shutdown would do, compared to simply killing the server:
Even with
MDEV-19514implemented, we still refuse read-only startup when the change buffer is not empty. The test innodb.innodb-change-buffer-recovery covers this scenario.Another stumbling stone would be that the redo log might not be empty.
We can fix both issues, by simply being prepared to apply buffered changes or redo log records at any time when an affected page is added to the buffer pool. We would not write any redo log or add anything to buf_pool_t::flush_list.
Note: Obviously, we cannot remove anything from recv_sys.pages in this mode, and neither would we modify any change buffer tree or bitmap pages, not even in the buffer pool. If a page is evicted from the buffer pool and reloaded later, we must apply the buffered changes or log records again.
We may have to refuse startup if the buffer pool is not sufficiently large for buffering all redo log records that were written since the latest checkpoint. The usable capacity of the buffer pool would depend on the size of log that was written since the previous checkpoint.