[MDEV-24673] btr_cur_pessimistic_delete() fails to shrink the index B-tree Created: 2021-01-25  Updated: 2024-01-05

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Debarun Banerjee
Resolution: Unresolved Votes: 0
Labels: performance

Issue Links:
Relates
relates to MDEV-24796 Assertion `page_has_next(block->frame... Closed
relates to MDEV-14637 Latching order violation during btr_c... Closed
relates to MDEV-24653 Assertion `block->page.id().page_no()... Closed

 Description   

As noted in MDEV-24653, the function btr_cur_pessimistic_delete() is neglecting the opportunity to shrink the index tree when only one sibling page would remain after btr_discard_page(). The MDEV-24653 test case creates a B-tree that consists of two pages: the root page pointing to only one child page, and a leaf page containing one hidden record.

And as noted in MDEV-14637, when fixing this, we would have to be very careful in order to avoid introducing deadlocks.


Generated at Thu Feb 08 09:31:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.