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

Parallel Slave SQL Thread Can Update Seconds_Behind_Master with Active Workers

Details

    Description

      If the workers of a parallel replica are busy (potentially with long queues), but the SQL thread has no events left to distribute (so it goes idle). Then the next event that comes from the primary will update LMT with its timestamp, even if the workers may be quite far behind.

      Proposed fix is for the SQL thread to additionally check if there are uncommitted events. That is, we should add an atomic counter (displayable as a new system status variable), which the SQL thread increments on reads, and that the workers decrement on commits. last_master_timestamp should only be updated by the SQL thread with the MDEV-29639 logic if this counter is 0.

      Attachments

        Issue Links

          Activity

            Hi Andrei!

            This is ready for review as PR-2682

            bnestere Brandon Nesterenko added a comment - Hi Andrei! This is ready for review as PR-2682

            Except for MDEV-31749 this is OK to push.

            Roel Roel Van de Paar added a comment - Except for MDEV-31749 this is OK to push.

            Please note that rpl.rpl_parallel_optimistic_until test failures (ref MDEV-23021) may be more pronounced after the implementation of this patch.

            Roel Roel Van de Paar added a comment - Please note that rpl.rpl_parallel_optimistic_until test failures (ref MDEV-23021 ) may be more pronounced after the implementation of this patch.

            People

              Elkin Andrei Elkin
              bnestere Brandon Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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