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

Support parallel read transactions on the same snapshot

    XMLWordPrintable

Details

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

    Description

      It would be very useful to be able to make a connection share the transaction snapshot of another connection that is already open and has started a consistent read transaction.

      This would not allow them to share the set of modifications (ie. inserts/updates/deletes not yet committed) - just the same query snapshot. It could even be read-only.

      If the transaction isolation levels are repeatable read, and no changes have been made, it means you can get perfectly consistent queries across the connections.

      The motivation is that then we can do parallel SQL backup dumps, parallel database resyncs, and parallel reporting queries. I would use all three personally.

      PostgreSQL 9.3 has introduced this feature using the function pg_export_snapshot to get the revision number and SET TRANSACTION SNAPSHOT <snapshot ID> to use it in another session (personally I think it would be more natural to pass it in the BEGIN/START TRANSACTION statement). They use it for parallel pg_dump which is good, but I would also use it in my apps as it is very hard to make full use of a modern database server with only one client thread and some big client jobs still take hours in a single thread.

      From what I understand of how InnoDB works, I think this is doable? The engine status shows lines like this:

      Trx read view will not see trx with id >= 1CE54868, sees < 1CE54864

      So we would need to be able to copy those values across to another connection/transaction.

      Thoughts?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              will.bryant Will Bryant
              Votes:
              7 Vote for this issue
              Watchers:
              11 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.