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

no semi-sync kill of a closed connection

    XMLWordPrintable

Details

    • Bug
    • Status: Approved (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 11.4
    • 11.4
    • None
    • None
    • Hide
      (Follow-up to MDEV-42004)
      Fix an extraneous semi-sync connection kill during STOP SLAVE when it has already closed the connection, which stalls STOP SLAVE until `@@rpl_semi_sync_slave_kill_conn_timeout` runs out
      Show
      (Follow-up to MDEV-42004 ) Fix an extraneous semi-sync connection kill during STOP SLAVE when it has already closed the connection, which stalls STOP SLAVE until `@@rpl_semi_sync_slave_kill_conn_timeout` runs out

    Description

      DESCRIPTION
      ===========
      To fix in 11.4. Complements MDEV-42004.

      Repl_semi_sync_slave::kill_connection() (sql/semisync_slave.cc) is called from
      Repl_semi_sync_slave::slave_stop() at the slave IO thread exit
      (handle_slave_io(), sql/slave.cc). It connects to the master again with a new
      handle to send "KILL <thread_id>" for the IO thread's connection.

      When the connection is already closed there is nothing to kill: end_server()
      has deleted the vio (mysql->net.vio == NULL) after a failed or interrupted
      (re)connect, e.g. STOP SLAVE interrupting a reconnect to a master that accepts
      the connection but does not answer (MDEV-42004). mysql->thread_id is a stale
      one by then. The new connect to the same unresponsive master waits
      rpl_semi_sync_slave_kill_conn_timeout once more, and its failure path is a
      no-op.

      Fix: return early from kill_connection() when mysql->net.vio is NULL.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Elkin Andrei Elkin
              Andrei Elkin Andrei Elkin
              Vladislav Vaintroub Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25d
                  0.25d

                  Git Integration

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