Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-444

Aurora Plugin: Not transaction-safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.4
    • Fix Version/s: N/A
    • Component/s: None
    • Labels:
      None
    • Environment:
      Aurora on AWS

      Description

      A client reported an issue about unscheduled failovers not working with MariaDB Connector/C, where our app using the connector had to be restarted (they said to pick up a DNS change, which seems suspect), so we started researching Aurora and came across the Aurora plugin.

      In aurora_command() I found some troubling code that appears to direct all queries to replica nodes, but if you're inside a SERIALIZABLE transaction, clearly this would be very very bad. It also appears to send all STMT PREPARE requests to a replica which too does not make sense.
      Relevent line in code

      The author appears to have wanted to use some sort of automated load balancing for read requests but that simply isn't feasible. If the code is modified to ONLY ever send commands to the primary, then this plugin should work for failover events since it should re-query other known members to see which one is now primary and fail over to it ... thus not relying on the AWS DNS-based failover.

      I should note I have not tested the plugin as I do not have access to an aurora instance, so I am going solely of a code review .... but it seems pretty straight forward.

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            bradh352 Brad House
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration