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

Buffer AHI usage counters btr_cur_n_*sea in non-atomic members of trx_t

    XMLWordPrintable

Details

    Description

      AHI usage counters, btr_cur_n_sea and btr_cur_n_non_sea, incremented in btr_cur_t::search_leaf(), are global instances of ib_counter_t<ulint, ib_counter_element_t>, which is a sharded (size 128) non-atomic (fuzzy) counter.

      The usage of such a peculiar data type might suggest earlier attempts at overhead reduction for incrementing those two counters.

      A better solution indicated by marko would be to replicate what was done in MDEV-37152: move the counters to some non-atomic members of trx_t and apply those changes back to the global counters (they can be possibly atomic then) only once per transaction (check trx_t::pages_accessed).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alessandro.vetere Alessandro Vetere
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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