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

Trim THD by moving out fields specific to system threads

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None

    Description

      Trim THD by moving out fields specific to system threads

      The class THD has a number of fields that are used only in special system
      threads (eg. replication SQL/worker threads), yet take up space (and CPU
      cache) for all threads.

      We should intruduce a THD::system_thread_info, which is a union of pointers to
      different structures used in different system threads. So that only a single
      pointer needs to be added to the THD to be able to handle all extra
      information needed by any special-purpose thread:

        union {
          rpl_io_thread_info *rpl_io_info;
          rpl_sql_thread_info *rpl_sql_info;
          // ...
        } system_thread_info;

      Non-exhaustive list of candidates to be moved into this union:

      • rpl_filter
      • rgi_slave
      • is_slave_error
      • slave_expected_error
      • slave_net

      In addition, it should be enough to have a single field,
      eg. THD::system_thread, that identifies the different system threads and thus
      which of the pointers in the system_thread_info union are valid. This should
      replace fields such as THD::slave_thread.

      Attachments

        Activity

          People

            knielsen Kristian Nielsen
            knielsen Kristian Nielsen
            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.