Muir Manders drivers all time


 0 Collaborator

 17 Patch
393f0c961220893ab75e4627f1487608014502a7, 313efb83f15939218e5150c6b80bbcfcf3b68322, c53c3654dc8acfc0ace976e1535cb0b8abb027a4, 45f58088bedd133427d965d3f76ce80b63517107, 19c7dfb959615b776743e6ee22eb904c733979f7, 91135b0fc234383061dbd7812434ec5dc3baa4cb, e204266169e29b64fdef1918f48a51344ff9dc5f, 441d1484e3289b639e8253da2a08d431b2593fef, 3be4c82e7682227970b4ba360cadcac4de3a7f14, b023df01af915fc2d9d5bf8ebad476b3ebd1f868, 5ed8c04148a7b8d5a169bf0931a85d9fb1ab8963, d2348c0775fa08af2b8f926c4a0cd55f3db5d209, 803daed9ccc06ced0d63fa3353c0335658ee14c0, 763d85a2a198d0fd5f0b1d5d1461d757e351a20e, a717e49bdbee3190bed64d59d06759d22a83aa9f, 7eda240e1d62a0966af4f72cdc22986d435b945e, 5cb2a3745139e054dc5906bd83fe7fda2ab96e3c

393f0c961220893ab75e4627f1487608014502a7 | Author: Muir Manders <muir@retailnext.net>
 | 2020-09-26 09:27:33-07:00

    Init host pools in parallel. (#1490)
    
    Creating a session can take a long time if your cluster is big and
    there's latency between you and the cluster. We are seeing it take
    ~10s to create a session to a 45 node cluster with ~30ms of latency.
    
    This is somewhat related to #1369 and #1429, but this change tries to
    do the simplest thing to speed up initial connection without changing
    any behavior.

313efb83f15939218e5150c6b80bbcfcf3b68322 | Author: Muir Manders <muir@retailnext.net>
 | 2020-02-02 11:34:19-08:00

    Fix token aware host policy. (#1400)
    
    With ShuffleReplicas enabled, we were shuffling an empty list of
    replicas and not doing any token aware routing.

c53c3654dc8acfc0ace976e1535cb0b8abb027a4 | Author: Muir Manders <muir@retailnext.net>
 | 2019-02-08 14:11:38-08:00

    Don't fetch aggregates/UDFs on version 2.1 (#1265)
    
    The system.schema_aggregates and system.schema_functions tables don't
    exists in 2.1 (these were added in 2.2).
    
    I added a version.AtLeast() function that inverts
    version.Before(). Normally you are checking for a minimum version, so
    this avoids additional negatives and makes things more readable.

45f58088bedd133427d965d3f76ce80b63517107 | Author: Muir Manders <muir@retailnext.net>
 | 2017-03-17 10:37:42-07:00

    Fix session level tracer.
    
    It was getting stuck when the trace queries via control connection
    re-entered the trace code (since they use the same session). Fix by
    unsetting Trace on the control connection queries so it doesn't try to
    trace the traces.

19c7dfb959615b776743e6ee22eb904c733979f7 | Author: Muir Manders <muir@retailnext.net>
 | 2017-03-14 11:04:29-07:00

    Fix setting batch timestamp.
    
    Wasn't passing along defaultColumnTimestampValue when creating the
    batch frame.

91135b0fc234383061dbd7812434ec5dc3baa4cb | Author: Muir Manders <muir@retailnext.net>
 | 2016-04-15 14:00:02-07:00

    Fix two bugs in stream id allocation. (#707)
    
    - Previously if GetStream() found an available stream but the CAS
      failed, it was skipping that stream and trying the next. However, a
      CAS failure doesn't mean the current bit is taken, just that some bit
      in the bucket changed. Fix to keep retrying the CAS while the bit it's
      checking continues to be available in the bucket.
    - When the CAS failed in GetStream(), it was re-loading the bucket using
      "offset" instead of "pos". This wouldn't end up causing any incorrect
      behavior, but it greatly reduces the chance of finding an available
      bit in the current bucket since the CAS will only succeed if
      c.streams[pos] happens to be the same as c.streams[offset] (assuming
      pos != offset).

e204266169e29b64fdef1918f48a51344ff9dc5f | Author: Muir Manders <muir@retailnext.net>
 | 2016-03-03 07:22:48-08:00

    Fix TestTokenAwareConnPool to wait for full pool.
    
    It was depending on the synchronous pool filling before.

441d1484e3289b639e8253da2a08d431b2593fef | Author: Muir Manders <muir@retailnext.net>
 | 2016-03-02 17:05:54-08:00

    Fix 100ms sleep when creating session.
    
    hostConnPool.fill() was synchronously filling the pool and calling
    fillingStopped(), which sleeps for ~100ms.
    
    - don't synchronously fill the entire conn pool (connect once
      synchronously, then fill the rest in a separate goroutine)
    - only sleep in hostConnPool.fillingStopped if fill() encountered an
      error
    - fix cleanup of bad system.peer in TestInvalidPeerEntry

3be4c82e7682227970b4ba360cadcac4de3a7f14 | Author: Muir Manders <muir@retailnext.net>
 | 2016-02-19 07:25:04-08:00

    Fix peer.version length validation.
    
    Versions can have 2 or 3 parts.

b023df01af915fc2d9d5bf8ebad476b3ebd1f868 | Author: Muir Manders <muir@retailnext.net>
 | 2016-02-18 16:20:12-08:00

    Don't crash on bad peers.
    
    It's possible (or at least was possible), to be left with invalid
    system.peers entries in your db after changing your
    ring (https://issues.apache.org/jira/browse/CASSANDRA-6053 is at least
    one way it used to be able to happen). If this happens (or someone who
    is already in this state upgrades gocql and is trying to doing peer
    discovery), ideally gocql would continue working on the good peers
    instead of crashing trying to parse the bad peers. I made two changes
    with this goal in mind:
    
    1. Fix version string parsing to not crash if version is too short.
    2. Skip peers if we fail parsing the version string (but still return
       the peers we were able to parse).
    3. When waiting for schema agreement, skip peers that have an empty
       schema_version (otherwise it times out and fails).
    
    Our ring had peer entries with null "rack", "release_version",
    "schema_version", and "tokens".

5ed8c04148a7b8d5a169bf0931a85d9fb1ab8963 | Author: Muir Manders <muir@retailnext.net>
 | 2016-02-16 19:36:12-08:00

    Fix token aware metadata fetching deadlock.
    
    The token aware host policy needs to fetch schema metadata so it can
    hash row keys properly. Before the internal "control" conn was added,
    metadata.go would set Query().RoutingKey([]byte{}) before it performed
    the metadata queries so the metadata queries themselves didn't re-enter
    the token aware host selection code (and deadlock). The control conn
    still works most of the time, though, because the control conn performs
    queries directly on a conn object, bypassing the token aware selection
    stuff. That is, unless there is more than one page of metadata, since
    iter.next.fetch() executes the query via the session, which re-enters
    the token aware host selection code.
    
    Fix by setting RoutingKey to []byte{} on the control conn's
    queries. This is the same tactic the old code was using to avoid this
    problem.

d2348c0775fa08af2b8f926c4a0cd55f3db5d209 | Author: Muir Manders <muir@retailnext.net>
 | 2015-09-18 15:53:04-07:00

    Add support for "LexicalUUIDType".
    
    Support it by treating it the same as UUIDType.
    
    AFAIK originally there was LexicalUUIDType and TimeUUIDType. Lexical did
    simple byte-wise comparison, where Time sorted using the UUID's time
    value. UUIDType was added as a convenience type (CASSANDRA-2233) which
    compares using the time value for time UUIDs, else byte-wise.
    LexicalUUIDType was deprecated but not removed. We still have some
    schema around explicitly using the LexicalUUIDType comparator.

803daed9ccc06ced0d63fa3353c0335658ee14c0 | Author: Muir Manders <muir@nearbuysystems.com>
 | 2014-10-01 14:47:47-07:00

    Fix bug fetching out unset timestamp values.
    
    If your row exists but has an empty timestamp column, your time.Time
    bind variable was being initialized to epoch time 0. Now it returns
    early and does not modify the bind variable. I considered having it
    instead set the bind variable to the go zero time.Time value, but
    since that is techincally a legitimate time value as well it still
    doesn't solve the semipredicate problem.
    
    I tweaked the timestamp marshal code to do "val.UnixNano() / 1000000"
    instead of "val.UnixNano() / time.Millisecond" because it doesn't make
    sense to do operations directly between integers and time.Duration values.
    The latter only works because the base unit for time.Duration happens to
    be nanoseconds.

763d85a2a198d0fd5f0b1d5d1461d757e351a20e | Author: Muir Manders <muir@nearbuysystems.com>
 | 2014-08-11 16:36:45-07:00

    Fix prepared statement caching bug.
    
    It wasn't caching the prepared statement by keyspace, so if you performed
    identical queries on two different keyspaces, it would use the prepared
    statement from the wrong keyspace (and end up querying against the wrong
    keyspace).
    
    I added a "currentKeyspace" field to the Conn struct so the statement caching
    code has it available to use as part of the cache key.

5cb2a3745139e054dc5906bd83fe7fda2ab96e3c | Author: Muir Manders <muir@nearbuysystems.com>
 | 2014-08-07 09:31:26-07:00

    Refactor integer unmarshaling to share code.
    
    Now unmarshalInt and unmarshalBigInt pass in an int64 decoded
    value into a shared unmarshalIntlike, which has all the logic
    to check that the decoded value fits into your bind variable.
    
    This is in preparation for adding varint support, which also
    will use the unmarshalIntlike function.

7eda240e1d62a0966af4f72cdc22986d435b945e | Author: Muir Manders <muir@nearbuysystems.com>
 | 2014-08-07 09:26:26-07:00

    Add support for varints.
    
    Similar to other integer types except you must demarshal varints
    greater than 8 bytes using a *big.Int. It is possible to detect
    unset varint fields when fetching using a **big.Int double pointer.
    Maybe all types should support this as a way to detect unset cells as
    opposed to cells with a value of zero?
    
    Varints are signed integers encoded using two's complement. When marshaling,
    gocql trims the encoded bytes down to the minimum required to encode the
    integer value (e.g. so if you encode a varint value that can fit in one byte,
    gocql will actually only send 1 byte).

a717e49bdbee3190bed64d59d06759d22a83aa9f | Author: Muir Manders <muir@nearbuysystems.com>
 | 2014-08-06 12:50:31-07:00

    Add myself to AUTHORS