[MDEV-32052] ALTER DROP PARTITION should not block other queries not using the partition Created: 2023-08-31  Updated: 2023-11-30

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Michael Widenius Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-32053 New features requested by customer on... Open

 Description   

As part of weekly/monthly maintenance the customer uses DROP PARTITION to get rid of old data.
If there is a long running query using the partitioned table, the DROP PARTITION will wait until the long running query ends and any other query using the partitioned tables will wait for the DROP PARTITION, which causes problems

The task is to ensure that other queries to not be blocked if the to-be-dropped partition is not used. DROP PARTITION should not return until the partition is truly dropped.

Some ideas how to achieve this:
Mark the to-be-dropped partition as unavailable to transaction started after the drop partition was done.
When all queries using the to-be-dropped partition has ended, we should drop the partition, but in such a way that other queries using the partition table will not be blocked for notable time.

When the above is done, we should consider doing the same for ALTER TABLE ADD PARTITION.


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