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

SAMU-64 Allow administrators to enable or disable parallel replication on a per-table basis

    XMLWordPrintable

Details

    • New Feature
    • Status: Needs Feedback (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.9
    • Replication
    • None

    Description

      SAMU-64 Allow administrators to enable or disable parallel replication on a per-table basis

      Per-domain dedicated thread for processing ordered transactions. The thread is reserved from the total number of domain threads (controlled by slave_parallel_threads and slave_domain_parallel_threads). Whether the event goes to ordered thread depends on FL_ALLOW_PARALLEL flag as well as several other conditions. FL_ALLOW_PARALLEL is passed from master and is set for the event depending on master configuration directives. To allow dedicated slave on server one must enable it explicitly with configuration directive:

        set global slave_ordered_thread= 1;
      

      Originally it was controlled by skip_parallel_replication session variable which can be changed per-statement. This patch adds several more directives to control it on per-schema and per-table levels:

        parallel_do_db
        parallel_do_table
        parallel_ignore_db
        parallel_ignore_table
        parallel_wild_do_table
        parallel_wild_ignore_table
      

      Each directive is comma-separated list of fully-qualified table names. Spaces after comma are ignored (but not before).

      "Table" directives take precedence over "db" directives. "Do" directives take precedence over "ignore" directives. "Wild" directives are checked if "do" and "ignore" directives did not match.

      If none of the above directives present everything is considered parallel. If any of the above directives present and the table did not match anything in the lists it is considered ordered.

      Examples:

        set @@global.parallel_do_db=  "db_parallel";
        set @@global.parallel_ignore_db= "db_serial";
        set global parallel_do_table=  "db_serial.t3,  db_serial.t1";
        set global parallel_wild_ignore_table= "db_parallel.non_parallel_%"
      

      Normal behavior of ordered transaction is before start to wait any of prior transactions to commit: they get into different commit groups. But since all the ordered transactions (within one domain) go to a single thread we may avoid that restriction with this directive on slave:

        set global slave_ordered_dont_wait= 1;
      

      When set events without explicit FL_WAITED flag going to ordered thread nonetheless accept optimistic speculation. I.e. they get into same commit group with parallel events: ordered event is executed in parallel with parallel events.

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              midenok Aleksey Midenkov
              Votes:
              1 Vote for this issue
              Watchers:
              8 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.