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

Create new "Registering transaction" thread state

    XMLWordPrintable

Details

    Description

      Currently, when an InnoDB transaction is in the "System lock" state, it appears that it also performs tasks related to transaction registration, since this is done from ha_innobase::external_lock.

      Should we create a new thread state called "Registering transaction" or something for this portion of the work?

      For example, we can see that the server goes into the "System lock" state and asks the storage engine to get the external lock here:

      https://github.com/MariaDB/server/blob/mariadb-10.4.4/sql/lock.cc#L341

      And as part of that process, InnoDB calls innobase_register_trx():

      https://github.com/MariaDB/server/blob/mariadb-10.4.4/storage/innobase/handler/ha_innodb.cc#L15651

      which calls trans_register_ha() and trx_register_for_2pc():

      https://github.com/MariaDB/server/blob/mariadb-10.4.4/storage/innobase/handler/ha_innodb.cc#L2987

      https://github.com/MariaDB/server/blob/mariadb-10.4.4/sql/handler.cc#L1176

      https://github.com/MariaDB/server/blob/mariadb-10.4.4/storage/innobase/handler/ha_innodb.cc#L2779

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              GeoffMontee Geoff Montee (Inactive)
              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.