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

Port Time Machine/Flashback Feature to MariaDB

Details

    • Flashback

    Description

      What’s Time Machine

      • Rolling back instances/databases/tables to a snapshot
      • Implement on Server-Level, so support all engines.
      • By full image format binary logs
      • Currently, it’s a feature inside mysqlbinlog tool (with --flashback option)

      How Time Machine Works

      • As we know, if binlog_format is ROW, all columns’ values are store in the row event, so we can
        get the data before mis-operation.
      • Just do following things:
        • Change Event Type, INSERT->DELETE, DELETE->INSERT
        • For Update_Event, swapping the SET part and WHERE part
        • Applying those events from the last one to the first one which mis-operation happened.
        • All the data will be recovered by inverse operations of mis-oprerations

      DDL supports are necessary

      • 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.

      How to Use Time Machine

      • I will create a Time Machine script to package mysqlbinlog --flashback command

      Attachments

        Issue Links

          Activity

            plinux Lixun Peng created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.2.5 [ 22117 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.2 [ 14601 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Fix Version/s 10.2.4 [ 22116 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Issue Type Task [ 3 ] Epic [ 5 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Epic Name Flashback
            ratzpo Rasmus Johansson (Inactive) made changes -
            Epic Child MDEV-10570 [ 57669 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Epic Child MDEV-10571 [ 57670 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.2.4 [ 22116 ]
            danblack Daniel Black made changes -
            Attachment flashback-name-graph.png [ 42969 ]
            Attachment flashback-name-summary.png [ 42970 ]
            serg Sergei Golubchik made changes -
            Due Date 2016-08-31
            serg Sergei Golubchik made changes -
            Summary Port Time Machine/Flashback Feature to 10.2 Port Time Machine/Flashback Feature to MariaDB
            Elkin Andrei Elkin made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 76523 ] MariaDB v4 [ 140023 ]

            People

              plinux Lixun Peng
              plinux Lixun Peng
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.