Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5
Description
MDEV-12353 introduces a purely physical redo log format.
For btr_page_reorganize_low(), there is no optimization as of now. It is essentially copying the page payload to the redo log, as if all records were inserted anew. A better approach would be to compare the old page contents to the reorganized one, and only emit the minimal amount of WRITE or MEMMOVE records to cover the changes.
This affects especially the innodb_defragment feature, because it is invoking btr_page_reorganize_low() extensively. The test used to work with the mysql-test/include/default_mysqld.cnf se{{page_delete_rec_list_end()}}tting of innodb_log_buffer_size=1M, but that had to be increased to innodb_log_buffer_size=6M to avoid warnings about the buffer being extended.
Attachments
Issue Links
- is caused by
-
MDEV-12353 Efficient InnoDB redo log record format
-
- Closed
-
- relates to
-
MDEV-21724 Optimize page_cur_insert_rec_low() redo logging
-
- Closed
-
Related to this, page_delete_rec_list_end() and page_cur_delete_rec() should be rewritten so that they will decrement PAGE_HEAP_TOP when deleting the very last records of a page, instead of prepending the deleted record to the PAGE_FREE list. That should reduce the need of page reorganize operations.
It could be worthwhile to always reorganize the page as part of page_delete_rec_list_start() and page_delete_rec_list_end().