[MDEV-32028] InnoDB scrubbing doesn't write zero while freeing the extent Created: 2023-08-28  Updated: 2023-10-21  Resolved: 2023-08-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.5, 10.6, 10.9, 10.10, 10.11, 11.1, 11.2
Fix Version/s: 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.1.3, 11.2.2

Type: Bug Priority: Critical
Reporter: Thirunarayanan Balathandayuthapani Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-28699 Shrink temporary tablespaces without ... Closed
Relates
relates to MDEV-32163 Crash recovery fails after DROP TABLE... Closed

 Description   

InnoDB fails to mark the page status as FREED during freeing of an extent of a segment.
This behaviour affects scrubbing and doesn't write all zeroes in file even though
pages are freed.

 
        fsp_free_extent(space, page, mtr);
      
        for (uint32_t i = 0; i < FSP_EXTENT_SIZE; i++) {
                if (!xdes_is_free(descr, i)) {
                        buf_page_free(space, first_page_in_extent + i, mtr,
                                      __FILE__, __LINE__);
                }
        }

Above fsp_free_extent() calls xdes_init() and reinitialize all bitmap of
the extent descriptor page. After that, we rely on bitmap of extent descriptor
page to call buf_page_free()



 Comments   
Comment by Marko Mäkelä [ 2023-08-28 ]

For the record, this bug was found while testing MDEV-28699.

Comment by Marko Mäkelä [ 2023-08-28 ]

Thank you, good work. I posted a quicker version of the test that still reproduces the issue when the fix is absent.

Generated at Thu Feb 08 10:28:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.