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

Redundant calls to convert implicit record locks to explicit ones when table S-lock is held

    XMLWordPrintable

Details

    • Related to performance
    • Q3/2026 Server Development

    Description

      In lock_clust_rec_read_check_and_lock there's a test on lock_table_has(trx, index->table, LOCK_X) which if fails would result in a call to lock_rec_convert_impl_to_expl<true>, which 1. has a comment "If an implicit x-lock exists on a record, convert it to an explicit one." that does not apply if a table S-lock is held and 2. does a few things such as looking up the trx_id of the record and find the trx in a global hash trx_sys. This could be called for every record scanned which affects performance

      Attachments

        Activity

          People

            ycp Yuchen Pei
            ycp Yuchen Pei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1d 4h 58m
                1d 4h 58m
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 2h 31m Time Not Required
                2h 31m

                Git Integration

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