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

Debug assertion with delayed_retry and master failure

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.5.6
    • 2.5.7
    • readwritesplit
    • None

    Description

      When delayed_retry is enabled and the following SQL is executed:

      CREATE TABLE test.t1 (id INT);
      SET @a = (SELECT SLEEP(@@server_id));
      INSERT INTO test.t1 SELECT SLEEP(10);
      

      If the slaves have larger server_id values than the master, they will execute the SET statement slower. This means that the INSERT will be started on the master before all of the results have been received from the slaves. If the master fails before the INSERT completes but after at least one slave has responded to the SET command, a debug assertion will be hit.

      This is happens because RWSplitSession::manage_transactions unconditionally erases the query without checking whether the backend in question is the one where the query was being executed on (implied by backend->has_session_commands() being false).

      In non-debug versions this would manifest as a failure to retry the query even though it should've been possible. An error would also be logged stating that readwritesplit was not expecting this state.

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.