MDEV-14180 fixup: Avoid unnecessary dirtying of pages

fil_crypt_rotate_page(): If a page is already marked as dirty,
do not move it in buf_pool.flush_list. Actual re-encryption
will happen in buf_flush_page(), and moving the page in
buf_pool.flush_list may only postpone the operation.
This commit is contained in:
Marko Mäkelä 2021-06-21 17:51:03 +03:00
parent 4dfec8b230
commit 09249eb9bd

View file

@ -1820,6 +1820,9 @@ fil_crypt_rotate_page(
if (block->page.status == buf_page_t::FREED) {
/* Do not modify freed pages to avoid an assertion
failure on recovery.*/
} else if (block->page.oldest_modification()) {
/* Do not unnecessarily touch pages that are
already dirty. */
} else if (space->is_stopping()) {
/* The tablespace is closing (in DROP TABLE or
TRUNCATE TABLE or similar): avoid further access */