Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32052

ALTER DROP PARTITION should not block other queries not using the partition

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              monty Michael Widenius
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.