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

kill session deletes XA prepared transaktion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.3.20
    • Fix Version/s: N/A
    • Component/s: XA
    • Labels:
      None
    • Environment:

      Description

      test sequence :
      session 1 ( which is killed ) :
      create table test( id int, text varchar(30) );
      xa start 'test1';
      insert into test values ( 1, 'killing this ses' );
      xa end 'test1';
      xa prepare 'test1';
      – to my knowledge : this prepared XA transaction has to survive a crash otherwise cant the transaction coordinator issue a xa commit;
      kontrol session 2 :
      MariaDB [(none)]> xa recover;
      ---------------------------------------+

      formatID gtrid_length bqual_length data

      ---------------------------------------+

      1 5 0 test1

      ---------------------------------------+
      1 row in set (0.00 sec)

      MariaDB [(none)]> kill 10;
      Query OK, 0 rows affected (0.00 sec)

      MariaDB [(none)]> xa recover;
      Empty set (0.00 sec)

      MariaDB [(none)]>
      So when the kill session is issued the xa recover list becomes empty.
      If this simulated crash happends, then the XA transaction coordinator will not be able to do XA commit if the XA transaction in the mariadb was part of a transaction involving multiple XA transaction providers.
      This can lead to data discrepency ( some does XA commit, mariadb cant ) during crash and XA should be crash proof.
      mysql 5.7.28 lists the XA transaction when the XA transaction is prepared and session is killed.
      It looks like bug :
      https://bugs.mysql.com/bug.php?id=12161
      hasnt been resolved into the mariadb code.
      Kind regards
      Steen

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              steenb steen bartholdy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: