Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-6765

Add ability to fix a truncated primary to MariaDB Monitor

    XMLWordPrintable

Details

    Description

      A semisync primary configured with rpl_semi_sync_master_wait_point=AFTER_SYNC and init-rpl-role=SLAVE will typically truncate its binary log from non-confirmed (missing replica acknowledgement) transactions when recovering after a crash. This is fine if failover has already happened:
      1. Either the new primary has the transaction, and the old primary can download and re-apply them. In this case the client needs to do some digging and confirm that the writes went through.
      2. The transactions never reached a replica and are totally lost. This is fine, as the client never received an OK.

      If, however, the primary recovers before failover, we have an issue: The server may throw away transactions that a replica (or multiple) already possesses. This causes diverging replication. Ideally, MaxScale should detect this situation and fix it. The issue can be fixed simply by having the primary replicate the missing transactions from the most advanced replica. This should be fast, as the primary should not be far behind. The replication connection created for this purpose should be naturally cleaned up right away.

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            allen.herrera Allen Herrera
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10d Original Estimate - 10d
                10d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 13d
                13d

                Git Integration

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