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

keepalive client connection on master failover

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • readwritesplit
    • None
    • MXS-SPRINT-53

    Description

      Planned Tasks

      • Allow re-connection to master servers
      • Allow the master server to change mid-session

      Original Issue

      The case that we try to solve are very frequent in 3 tiers Java Applications , we have long running connections in a 1 to 1 model majority of connection in state Idle. Loosing the DB backend would generate JDBC errors leaving some application that don't catch exception in a failed situation , despite we could have hidden this to all sessions that have committed just before the failure

      Connection context tracking will be used (encoding, variables prepared statement ),
      Maxscale maintain session variable keepalive = 0

      On event
      If tmp table set keepalive = 1
      If SP Call set keepalive = 2
      If keepalive not in (1,2) and autocomit =1 and statement set keepalive = 0
      If keepalive not in (1,2) and autocomit =1 and query=ANY set keepalive = 0

      If keepalive not in (1,2) and autocomit =1 and query=BEGIN set keepalive = 3
      If keepalive not in (1,2) and autocomit =1 and keepalive = 3 and query=ANY set keepalive = 4
      If keepalive not in (1,2) and autocomit =1 and query=COMMIT set keepalive =0

      If keepalive not in (1,2) and autocomit =0 and query=COMMIT set keepalive =3
      If keepalive not in (1,2) and autocomit =0 and query=ANY set keepalive =4

      We can keepalive in keepalive =0 and keepalive=3
      If keepalive=3 we need to START TRANSACTION on the new backend

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              stephane@skysql.com VAROQUI Stephane
              Votes:
              2 Vote for this issue
              Watchers:
              6 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.