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

When executing a switchover, former master remains with sleep and read-only connections

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 2.2.9
    • 2.4.8
    • readconnroute
    • None
    • MXS-SPRINT-101, MXS-SPRINT-102, MXS-SPRINT-103, MXS-SPRINT-104

    Description

      Folks,

      I found an interesting situation. I have a simple environment running a replication cluster with a master and a slave. Database servers and Maxscale are in production, and the application is not being stopped for performing the switchover. Before the switchover, I have 200 threads open on master and none on the slave. After the switchover, the threads running on the former master keeps open, and when closed by Maxscale, I see the following messages in the error log:

      #: before switching over
      root@dwbm-maxscale01:~# maxadmin list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status
      -------------------+-----------------+-------+-------------+--------------------
      wbm-mariadb01      | 192.168.0.11    |  3306 |          39 | Master, Running
      wbm-mariadb02      | 192.168.0.12    |  3306 |         112 | Slave, Running
      -------------------+-----------------+-------+-------------+--------------------
       
      #: after switching over
      root@wbm-maxscale01:~# maxadmin list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status
      -------------------+-----------------+-------+-------------+--------------------
      wbm-mariadb01      | 192.168.0.11    |  3306 |           5 | Slave, Running
      wbm-mariadb02      | 192.168.0.12    |  3306 |          84 | Master, Running
      -------------------+-----------------+-------+-------------+--------------------
      

      When those remaining 5 connections start getting closed, I see the below in the error log:

      2018-07-04 12:17:35.028   error  : (130) [readconnroute] (log_closed_session): Failed to route MySQL command 1 to backend server.
      2018-07-04 12:17:35.028   error  : (130) [mariadbclient] (gw_read_finish_processing): Routing the query failed. Session will be closed.
      

      Can we clean up all sleeping and read-only threads before getting the new master up? I mean, can we kill all sleepers and read-only threads before saying the switchover was successfully done?

      Thanks!

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            wagnerbianchi Wagner Bianchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.