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

Implement support to handle DDL Statements with Flashback

Details

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

    Description

      The first implementation of the flashback feature only reverts DML based statements up to a point where a DDL statement was executed.

      For the support of DDL changes in the server are needed.

      • For ADD INDEX/COLUMN, or CREATE TABLE query, just drop the index, column, table when running Flashback.
      • For DROP INDEX/COLUMN, or DROP TABLE query, will copy or rename the old table to a reserved database. When Flashback is running, I can drop new table, and rename the saved old table to original database.
      • For TRUNCATE table, I just rename old table to reserved database and create a new empty table.

      Attachments

        Issue Links

          Activity

            ralf.gebhardt Ralf Gebhardt created issue -

            RocksDB has persistent snapshots that make this trivial to implement for MyRocks assuming dictionary tables use MyRocks.
            http://rocksdb.org/blog/2015/11/10/use-checkpoints-for-efficient-snapshots.html

            mdcallag Mark Callaghan added a comment - RocksDB has persistent snapshots that make this trivial to implement for MyRocks assuming dictionary tables use MyRocks. http://rocksdb.org/blog/2015/11/10/use-checkpoints-for-efficient-snapshots.html
            ratzpo Rasmus Johansson (Inactive) made changes -
            Field Original Value New Value
            Parent MDEV-10459 [ 57519 ]
            Issue Type Technical task [ 7 ] Task [ 3 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Fix Version/s 10.2 [ 14601 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Epic Link MDEV-10459 [ 57519 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.2 [ 14601 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            Elkin Andrei Elkin made changes -

            So enabling this means that 'faster' alter table operations are no longer possible: All ALTER TABLE will be the slow 'copy' algorithm.

            Next to that, when running ALTER TABLE on a 100GB table, there will be a 100GB old table left. When is this old table being deleted? Does this happen automatically when the binary logs containing this event are deleted?
            If so: Does that mean rotating binary logs can create (series of) complete buffer pool locks (because it is dropping a table)? Rule of thumb is that MariaDB locks for 1 second per 100GB buffer pool. So if there are 100 TRUNCATE tables in the binary log that is being rotated and the buffer pool is 200GB, the outage for rotating log files would be 200 seconds?

            michaeldg Michaël de groot added a comment - So enabling this means that 'faster' alter table operations are no longer possible: All ALTER TABLE will be the slow 'copy' algorithm. Next to that, when running ALTER TABLE on a 100GB table, there will be a 100GB old table left. When is this old table being deleted? Does this happen automatically when the binary logs containing this event are deleted? If so: Does that mean rotating binary logs can create (series of) complete buffer pool locks (because it is dropping a table)? Rule of thumb is that MariaDB locks for 1 second per 100GB buffer pool. So if there are 100 TRUNCATE tables in the binary log that is being rotated and the buffer pool is 200GB, the outage for rotating log files would be 200 seconds?
            michaeldg Michaël de groot made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 76675 ] MariaDB v4 [ 130516 ]
            greenman Ian Gilfillan added a comment -

            Hi plinux are you still working on this?

            greenman Ian Gilfillan added a comment - Hi plinux are you still working on this?

            People

              plinux Lixun Peng
              ralf.gebhardt Ralf Gebhardt
              Votes:
              9 Vote for this issue
              Watchers:
              16 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.