Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDEV-34009] Client-side implementation of instant failover mechanism #246

Open
wants to merge 3 commits into
base: 3.4
Choose a base branch
from

Commits on Apr 29, 2024

  1. [MDEV-34009] Follow instant failover error packets

    If the server responds to our initial connection with an error packet having
    error number `ER_INSTANT_FAILOVER`, and an error string formatted as
    `|Human-readable message|host[:port]`, then redirect accordingly.
    
    This redirection is performed in `mthd_my_real_connect`, which appears to be
    the most appropriate location given that it already contains code for
    retrying/repeating a new server connection.
    
    All new code of the whole pull request, including one or several files
    that are either new files or modified ones, are contributed under the
    BSD-new license. I am contributing on behalf of my employer Amazon Web
    Services, Inc.
    dlenski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f294514 View commit details
    Browse the repository at this point in the history
  2. Allow clients to disable server-initiated instant failovers

    This adds a new boolean option, `follow-instant-failovers` (ENABLED by
    default), to allow the client to disable server-initiated instant failover
    and simply return an error message.
    
    All new code of the whole pull request, including one or several files
    that are either new files or modified ones, are contributed under the
    BSD-new license. I am contributing on behalf of my employer Amazon Web
    Services, Inc.
    dlenski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    1860c71 View commit details
    Browse the repository at this point in the history
  3. Limit number of server-initiated instant failovers followed by client

    Set the limit to 8 for now. This will prevent the client from getting stuck
    in redirect loops.
    
    All new code of the whole pull request, including one or several files
    that are either new files or modified ones, are contributed under the
    BSD-new license. I am contributing on behalf of my employer Amazon Web
    Services, Inc.
    dlenski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f81e7a9 View commit details
    Browse the repository at this point in the history