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

Shard awareness extension for Scylla patchset 2 #1211

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Commits on Mar 26, 2019

  1. conn: introduced supported field containing payload of SUPPORTED frame

    Co-authored-by: Henrik Johansson <henrik@scylladb.com>
    Co-authored-by: Michał Matczuk <michal@scylladb.com>
    mmatczuk and Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    afa7eab View commit details
    Browse the repository at this point in the history
  2. SelectedHost: added Token function

    This allows tokenAwareHostPolicy return token from ExecutableQuery.
    
    Co-authored-by: Henrik Johansson <henrik@scylladb.com>
    Co-authored-by: Michał Matczuk <michal@scylladb.com>
    mmatczuk and Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    5963c95 View commit details
    Browse the repository at this point in the history
  3. hostConnPool: introduced ConnPicker interface to abstract pool storage

    The hostConnPool logic around conns slice is moved to defaultConnPicker.
    
    Co-authored-by: Henrik Johansson <henrik@scylladb.com>
    Co-authored-by: Michał Matczuk <michal@scylladb.com>
    mmatczuk and Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    10957f9 View commit details
    Browse the repository at this point in the history
  4. scylla: dedicated token aware ConnPicker

    This is an extension to tokenAwareHostPolicy supported by the Scylla 2.3
    and onwards. It allows driver to select a connection to shard on a host
    based on the token. The protocol extension spec is available at [1].
    
    [1] https://github.com/scylladb/scylla/blob/master/docs/protocol-extensions.md
    
    Co-authored-by: Henrik Johansson <henrik@scylladb.com>
    Co-authored-by: Michał Matczuk <michal@scylladb.com>
    mmatczuk and Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    51460b5 View commit details
    Browse the repository at this point in the history
  5. scylla: lazily close excess connections.

    A list of excess connections is maintained to allow for lazy removal of.
    excess connections. Keeping excess connections open helps reaching equilibrium
    faster since the likelihood of hitting the same shard decreases with the number
    of connections to the shard. The excess connections list is currently
    capped to 10 times the number of shards. This magic number has no
    backing statistics but sounds reasonable.
    Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    b794c9f View commit details
    Browse the repository at this point in the history
  6. scylla: give out random connections before pool equilibrium

    When the pool is not yet fully materialized we give the caller
    a random connection to allow the session to start working.
    Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    f1af639 View commit details
    Browse the repository at this point in the history
  7. scylla: ensure we use the correct token to determine shard

    The driver silently replaced the current token with the closest one
    from the token ring that it could find. This worked well enough
    to route the request to the correct host but to pick the right shard
    we need the actual token for the qiven query.
    Henrik Johansson committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    1ad3b47 View commit details
    Browse the repository at this point in the history