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

ORM Connection Pooling Not Working With Causal Reads

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • readwritesplit
    • None
    • Centos 7.x

    Description

      The causal read feature of the ReadWriteSplit router does not work if the application that connects to MaxScale is using connection pooling. For example:

      Sequelize is a promise-based Node.js ORM that includes connection pooling.

      Typical database connection construction looks like this:

        database: {
          host: 'scdb.selectquotesenior.com',
          name: 'selectcare_sqs',
          username: 'selectcare',
          password: 'password',
          pool: {
            max: 10,
            min: 0,
            idle: 10000
          }
        },
      

      In this scenario, the customer is using MaxScale 2.3.4 with MariaDB 10.3.12.

      session_track_system_variables is set to include last_gtid.

      Causal reads work as expected when directly connecting to MaxScale with a single client.

      However, when using pooling in the application layer or abstraction layer, one thread in the pool might have done the write while others may be doing the reads. Currently MaxScale cannot track this type of behavior and sees them as two separate connections which is not caught by the causal read feature of MaxScale.

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              toddstoffel Todd Stoffel (Inactive)
              Votes:
              1 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.