Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
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
- relates to
-
MDEV-20269 Create new "Auditing" thread state
- Open