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

XA recovery not supported for RocksDB

    XMLWordPrintable

    Details

      Description

      I'm not sure whether it's supposed to work. If it's not, it should probably be documented.

      # Run with --mysqld=--plugin-load-add=ha_rocksdb
       
      --connect (con1,localhost,root,,test)
      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT) ENGINE=RocksDB;
       
      XA START 'xa1';
      INSERT INTO t1 (a) VALUES (1),(2);
      XA END 'xa1';
      XA PREPARE 'xa1';
       
      --connect (con2,localhost,root,,test)
      XA START 'xa2';
      INSERT INTO t1 (a) VALUES (3);
      INSERT INTO t1 (a) VALUES (4);
      XA END 'xa2';
      XA PREPARE 'xa2';
       
      --connection default
      sleep 1;
       
      --let $shutdown_timeout= 0
      --source include/restart_mysqld.inc
       
      --connect (con3,localhost,root,,test)
      --disable_abort_on_error
      XA RECOVER;
      XA ROLLBACK 'xa1';
      XA COMMIT 'xa2';
      SELECT a FROM t1;
      DROP TABLE t1;
      

      Both transactions are forgotten after recovery:

      connect  con3,localhost,root,,test;
      XA RECOVER;
      formatID	gtrid_length	bqual_length	data
      XA ROLLBACK 'xa1';
      ERROR XAE04: XAER_NOTA: Unknown XID
      XA COMMIT 'xa2';
      ERROR XAE04: XAER_NOTA: Unknown XID
      SELECT a FROM t1;
      a
      DROP TABLE t1;
      

        Attachments

          Activity

            People

            Assignee:
            psergei Sergei Petrunia
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration