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

CREATE-or-REPLACE bilogged without DDL flag

Details

    Description

      create or replace of both table and sequence are not logged with Gtid event DDL flag
      which affects the slave parallel execution.
      Unlike other DDL:s these two can occur in concurrent execution with following transactions
      which can lead to various errors, including asserts like

      (mdl_request->type != MDL_INTENTION_EXCLUSIVE && mdl_request->type != MDL_EXCLUSIVE) || !(get_thd()->rgi_slave && get_thd()->rgi_slave->is_parallel_exec && lock->check_if_conflicting_replication_locks(this)
      
      

      of MDL_context::acquire_lock

      Attachments

        Activity

          Elkin Andrei Elkin added a comment -

          Brandon, this one needs fixing the master side. That's why I test it only there.
          Having the DDL flag ensures correct assert-free behaviour like other DDL:s produce.

          Elkin Andrei Elkin added a comment - Brandon, this one needs fixing the master side. That's why I test it only there. Having the DDL flag ensures correct assert-free behaviour like other DDL:s produce.
          Elkin Andrei Elkin added a comment -

          I simplified the commit to withdraw the regular table part. It turns out the stmt level flag is not completely lost in that case. The stmt flag gets merged into all the whole trx flag set and Gtid ctor finds the "all" one. I somewhat missed to read that. In the Sequence case the merging is also done, but "all" gets cleared 'cos of an implicit_commit call before C-o-R Seq eventually gets to executing the ctor. So that part is preserved. The test is also rather trivial now. Pushed to bb-10.3-andrei (as the Seq is added starting from it).

          Elkin Andrei Elkin added a comment - I simplified the commit to withdraw the regular table part. It turns out the stmt level flag is not completely lost in that case. The stmt flag gets merged into all the whole trx flag set and Gtid ctor finds the "all" one. I somewhat missed to read that. In the Sequence case the merging is also done, but "all" gets cleared 'cos of an implicit_commit call before C-o-R Seq eventually gets to executing the ctor. So that part is preserved. The test is also rather trivial now. Pushed to bb-10.3-andrei (as the Seq is added starting from it).

          Elkin the new commit from bb-10.3-andrei (80da35a) looks good, approved.

          bnestere Brandon Nesterenko added a comment - Elkin the new commit from bb-10.3-andrei ( 80da35a ) looks good, approved .
          Elkin Andrei Elkin added a comment -

          Another execution branch is found to lose the flag. A new commit is coming out.

          Elkin Andrei Elkin added a comment - Another execution branch is found to lose the flag. A new commit is coming out.
          Elkin Andrei Elkin added a comment -

          9e5ea2ef4a9 and its predecessor commits were pushed first to 10.8 QA branch to remove the issue
          temporarily.

          Elkin Andrei Elkin added a comment - 9e5ea2ef4a9 and its predecessor commits were pushed first to 10.8 QA branch to remove the issue temporarily.

          Patch review. On my end I only would like to see a code comment which explains the expected life-cycle of the flags.

          bnestere Brandon Nesterenko added a comment - Patch review. On my end I only would like to see a code comment which explains the expected life-cycle of the flags.

          The latest patch 55a01af looks good. Thanks!

          bnestere Brandon Nesterenko added a comment - The latest patch 55a01af looks good. Thanks!

          People

            Elkin Andrei Elkin
            Elkin Andrei Elkin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.