Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 2, 2015
  1. @jeffrymorris

    NCBC-934: Ensure GetFromReplica returns an IOperationResult

    jeffrymorris authored
    Motivation
    ----------
    In certain cases the replicas list may be empty, even though replicas are
    available. If no replicas are found an IOperationResult should be
    returned, not null as was happening in previous versions. Additionally,
    the SDK will try to do a successful replica read until it times out or
    success is returned if replicas are configured.
    
    Modifications
    -------------
    Moved around the code in CouchbaseCOnfigContext to ensure that there is
    not a time in which the replicas could be empty. Added logic to ensure
    that IOperationResult is returned instead of null if the replicas list is
    empty.
    
    Result
    ------
    If no replicas can be found (perhaps an inconsistent state during a
    rebalance), an IOperationResult will be returned. The Result field will
    indicate an OperationTimeout if it ran to timeout, NoReplicasFOund if replicas are
    not configured, or success if the read was successful.
    
    Change-Id: I06b3b7711b68b2d9ac334ad53fc2eece9f3f0aa4
    Reviewed-on: http://review.couchbase.org/52766
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jun 30, 2015
  1. @jeffrymorris

    NCBC-932: BodyLength is zero when receive buffer tries read from it

    jeffrymorris authored
    Motivation
    ----------
    Fixes a bug where the receive buffer length is the size of the last send.
    In certain cases when the buffer is smaller than the header size, the
    first receive will fail to read the entire document.
    
    Modifications
    -------------
    Before the first receive is called in Connection.Send, the buffer is reset
    back to the size specified in the config.
    
    Results
    -------
    Documents that exceed the buffer length by less than 24 bytes will still
    properly be inserted; ResponseStatus.None will not be returned.
    
    Change-Id: I6b9f974cea267a5ba26ee48c94be81088aed79af
    Reviewed-on: http://review.couchbase.org/52692
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jun 23, 2015
  1. @jeffrymorris

    NCBC-924: part 2 - Port defaults to 0 when NodeExt is not found in cl…

    jeffrymorris authored
    …uster map
    
    Motivation
    ----------
    Moves the setting of the CouchbaseApiBase fields above the node
    initialization section. This was omitted in the intial patch and will
    cause an error.
    
    Modification
    ------------
    Moves the setting of the CouchbaseApiBase fields above the node
    initialization section in NodeAdapter.
    
    Result
    ------
    If the Node is used, it will not error out when trying to parse the port
    from CouchbaseApiBase.
    
    Change-Id: I50d346d2e6925b1f100fc120d82b32d90a1dbdfa
    Reviewed-on: http://review.couchbase.org/52395
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
Commits on Jun 22, 2015
  1. @jeffrymorris

    NCBC-917: Collection modified error during bulk operation

    jeffrymorris authored
    Motivation
    ----------
    Fixes a bug were seperate thread would modify a collection while it was
    being enumerated.
    
    Modification
    ------------
    Extended the critical section to include the check to see if the endpoints
    collection was null or empty before loading it.
    
    Result
    -------
    The code should no longer throw the following exception:
    System.InvalidOperationException: Collection was modified; enumeration
    operation may not execute.
    
    Change-Id: I86b82c3d46f3c2f308f2ec1e77e184464aa1621e
    Reviewed-on: http://review.couchbase.org/52349
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  2. @jeffrymorris

    NCBC-924: Port defaults to 0 when NodeExt is not found in cluster map

    jeffrymorris authored
    Motivation
    ----------
    Fixes a regression in which the ports will default to 0 in pre-nodesExt
    versions of Couchbase server.
    
    Modifications
    -------------
    Updated NodeAdapter so that it detects the case in which nodesExt is
    missing and uses the Nodes information to get the ports to use. Added unit
    tests and some refactoring/formatting to existing tests.
    
    Result
    ------
    If the nodesExt object is missing from the cluster map, the client will
    now default to the nodes array for port information.
    
    Change-Id: I466b396272fdec816aaff5e610f6a71240f26169
    Reviewed-on: http://review.couchbase.org/52347
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-922: Part 2 - Receiving none(0xffffffff) as response status duri…

    jeffrymorris authored
    …ng failover
    
    Motivation
    ----------
    This amends a previous commit for NCBC-922 by adding a new ResponseStatus
    called TransportFailure which is returned when a SocketException is
    returned indicating that their was a transport level failure on send or
    recieve. In a future feature, this will make it easier to allow app to
    determine which type of failures it may want to retry for example.
    
    Modifications
    -------------
    ResponseStatus now has a new field called TransportFailure (0x0500) which
    is returned if a SocketException is thrown and caught while sending or
    receiving an operation. Catch blocks were updated so that that the
    IOperationResult.Status would have this value assigned depending upon the
    exception type.
    
    Results
    -------
    If a SocketException is caught, the SDK will return TransportFailure; all
    other client side exceptions (errors not returned in the memcached packet)
    will be ClientFailure.
    
    Change-Id: I2e03de03a2a03988ef4d74584f1b84ba938d3330
    Reviewed-on: http://review.couchbase.org/52327
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Jun 19, 2015
  1. @jeffrymorris

    NCBC-922: Receiving none(0xffffffff) as response status during failover

    jeffrymorris authored
    Motivation
    ----------
    A response status of 'None' indicates that the status was never set; the
    SDK should never return this value.
    
    Modifications
    -------------
    Added a catch block which sets the Exception field on the operation which
    will cause the GetResult and GetResultWithValue methods to return a failure
    state.
    
    Result
    ------
    If an error occurs the proper respons status will be returned.
    
    Change-Id: I6252b86bd9cb53a3b90ca10b6a2125ff5a66e426
    Reviewed-on: http://review.couchbase.org/52288
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Jun 18, 2015
  1. @jeffrymorris

    NCBC-913: SDK incorrectly states down node heartbeat is 1000s instead…

    jeffrymorris authored
    … of 1000ms
    
    Motivation
    ----------
    If a node unavailable, the sdk will return an error message that states
    "...The SDK will continue to try to connect every 1000 seconds..". This
    should be 1000 milliseconds not seconds.
    
    Modifications
    -------------
    Message was modified from 1000 seconds to 1000ms in ExceptionUtil.cs
    
    Result
    ------
    The SDK now returns the correct error message indicating that it will try
    re-connect in 1 second.
    
    Change-Id: Ice93a0906def8bf0e22d3c8f42c45470f4875cc4
    Reviewed-on: http://review.couchbase.org/52197
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  2. @jeffrymorris

    NCBC-918: Throughput is not restored with rb2out on memcached bucket

    jeffrymorris authored
    Motivation
    ----------
    Fixes bug in which the SDK continues to return NodeUnavailable even after
    failover/rebalance is completed.
    
    Modifications
    -------------
    MemcachedConfigContext was using the class level (older) nodes collection
    when creating the servers list instead of the new, updated nodes
    collection passed into the method.
    
    Result
    ------
    Throughput is restored after a rebalance on a Memcached bucket.
    
    Change-Id: I4d6bd9bac50617728b578aeadf84a67e74175ed3
    Reviewed-on: http://review.couchbase.org/52161
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  3. @jeffrymorris

    NCBC-895: BufferAllocator is created per Connection

    jeffrymorris authored
    Motivation
    ----------
    Makes the buffer for K/V IO a contiguous buffer per cluster node.
    
    Modifications
    -------------
    Refactored so that BufferAllocator is now allocated at the ConnectionPool
    level, instead of per connection. Changed the connection logic to use the
    Offset of the SAEA assigned to itself as the offset for reading and
    writing to the contiguous buffer.
    
    Result
    ------
    The SDK now uses the full range of indexes available and allocates the
    buffer for each cluster node as a contiguous buffer.
    
    Change-Id: If66e3eba88af5cb6ae801dbbace5cf9dd52a8e83
    Reviewed-on: http://review.couchbase.org/52038
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  4. @jeffrymorris

    NCBC-886: Check opaque of response header against op Opaque

    jeffrymorris authored
    Motivation
    ----------
    Adds a comparison of the opaque returned in the packet with the
    operation object's opaque field to ensure that they match.
    
    Modifications
    -------------
    The Read method in OperationBase now does a opaque comparison after
    reading the header; if the two are not equal, a ClientFailure will be
    returned and a message indicating the expected and actual opaque values.
    Some of the SASL operation's didn't send an opaque, so they were modified
    to do so. The Connection class now sets IsDead to true if the read request
    ends up returning 0 bytes.
    
    Results
    -------
    If the response of the operation does match the request, the client will
    return an error.
    
    Change-Id: I0c89c1b8d8560263507ebdc7efc8386cd9c4e1da
    Reviewed-on: http://review.couchbase.org/51933
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  5. @Svizel @jeffrymorris

    NCBC-919: Global connection pool setting for app.config

    Svizel authored jeffrymorris committed
    Motivation
    ----------
    Programmatic configuration allowed setting up connection pools on global
    level. Add same functionality to configuration through app.config.
    
    Modifications
    -------------
    
    Results
    -------
    It is now possible to configure connection pools at a global level via the
    config file or programatically.
    
    Change-Id: Ic2ad0f7fbfd76e18e56cfd708a1428ae77337a46
    Reviewed-on: http://review.couchbase.org/52163
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jun 11, 2015
  1. @subalakr @jeffrymorris

    Add internal apis for exists returning IOperationResult

    subalakr authored jeffrymorris committed
    Motivation
    ----------
    Make the operation result visible to sdkd for failure analysis
    
    Modification
    ------------
    Internal methods _Exists and _ExistsAsync in CouchbaseBucket class
    
    Change-Id: I72f2d7ae1d28604c4954982e581f747b94cf60e5
    Reviewed-on: http://review.couchbase.org/51525
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jun 10, 2015
  1. @jeffrymorris

    NCBC-823: IndexOutOfRangeException when IO error occurs

    jeffrymorris authored
    Motivation
    ----------
    If an IO error occurs while an operation is in mid-flight, the SDK would
    handle the IO exception and try to read the buffer. Often the buffer would
    be empty which would cause an IOORE leading to the Exception field of the
    IOperationResult being overridden with the IOORE, masking the actual
    error.
    
    Modifications
    -------------
    Added several checks to ensure the buffer was valid before reading in
    OperationBase and DefaultIOStrategy. Added a new enum value to
    ResponseStatus: None, which indicates that the header has never been read.
    
    Results
    -------
    The correct error should be returned back to the client. Operations that
    can be re-tried such as GET and any mutation operations with a CAS value
    will be retried. If the retry is not succesful, the operation may timeout.
    
    Change-Id: I3d21dd256a77d084a3413752e2c300f372320676
    Reviewed-on: http://review.couchbase.org/51890
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jun 9, 2015
  1. @jeffrymorris

    NCBC-912: Client tries to deserialize memcached body when it is empty

    jeffrymorris authored
    Motivation
    ----------
    If the body is empty, the SDK should bypass deserialization and the value
    field should be the default value of T.
    
    Modifications
    -------------
    Added a check in the DefaultSerializer to see if the length of the buffer
    is 0, if it is, deserialization is bypassed.
    
    Results
    -------
    The overhead of deserilization is no longer encountered when it's not
    needed.
    
    Change-Id: I636ae35784013cfbde47a212ce0a604421f5eab2
    Reviewed-on: http://review.couchbase.org/51802
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-903: Ensure k/v requests to memcached buckets use data nodes

    jeffrymorris authored
    Motivation
    ----------
    Memcached nodes require Ketama hashing for uniform key assignment to
    nodes. The list of available nodes should only be Data nodes (not Query or
    Index for example).
    
    Modifications
    -------------
    When the KetemaKeyMapper is initialized, only include nodes with the
    IsDataNode to be used.
    
    Results
    -------
    Memcached buckets will only use data nodes for K/V operations.
    
    Change-Id: I509d1361c45d3e88190689a49eae376d107bc7ea
    Reviewed-on: http://review.couchbase.org/51635
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-904: Return error when op is attempted on node that doesn't supp…

    jeffrymorris authored
    …ort service
    
    Motivation
    ----------
    If an operation is attempted on a service that the cluster doesn't
    support, throw an error with the reason.
    
    Modifications
    -------------
    The Is[SERVICE]Capable flag is set when the cluster config is read and
    checked when an operation is attempted. If the cluster doesn't support the
    service, a ServiceNotSupportedException is thrown.
    
    Result
    ------
    If the cluster does not support a requested operation, the SDK will
    immediatly throw a ServiceNotSupported exception.
    
    Change-Id: I6c052d67d48c5d1dd66a3d8f338f9039738b00fd
    
    Conflicts:
    	Src/Couchbase/Configuration/CouchbaseConfigContext.cs
    Change-Id: Ie11d290d42162a2a051ec8c867df6c85830b24b3
    Reviewed-on: http://review.couchbase.org/51879
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. @jeffrymorris

    NCBC-902: Make Server selection 'service aware'

    jeffrymorris authored
    Motivation
    ----------
    This changeset makes the SDK 'service aware'; when a Query request is
    executed only the nodes with the query service registered will execute the
    query, otherwise an exception will be raised.
    
    Modifications
    -------------
    The ConfigContextBase now has segragates the nodes by service into
    separate lists. Accessor methods are available which will return a random
    node if called. Additional properties were added to IConfigInfo to reflect
    if the cluster supports a service.
    
    Results
    -------
    The SDK now will send a request for an operation to the correct node if
    the cluster doesn't support a service then the client will return an
    exception.
    
    Change-Id: I9b5d7df3e7b5eaa10019fac06cf0ee9cc3e4f5ae
    Reviewed-on: http://review.couchbase.org/51559
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  5. @jeffrymorris

    NCBC-901: Make IServer implementations aware of Services defined by N…

    jeffrymorris authored
    …odesExt
    
    Motivation
    ----------
    In order for the SDK to take advantage of multi-dimensional scaling, the
    client must maintain statefulness of which service each node is reponsible
    for.
    
    Modifications
    -------------
    The IService interface has added properties for which service it is
    reponsible for: IsQueryNode, IsDataNode, etc. These are set by the values
    in nodesExt from the cluster config. Some additional refactoring was done
    around url writing and IPEndPoint and IPAddress resolution, finally unit
    tests were updated.
    
    Result
    ------
    The internal nodes (IServer) instances are aware of the services that they
    are reponsible for via configuration.
    
    Change-Id: I80458a3a2ed21c200d4927a7da29bcb530529214
    Reviewed-on: http://review.couchbase.org/51494
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  6. @jeffrymorris

    NCBC-891: Update Common.Logging to version 3.1

    jeffrymorris authored
    Motivation
    ----------
    Common.Logging updated to from 3.0 to 3.1 which has cause some versioning
    issues.
    
    Modifications
    -------------
    Updated NuGet dependencies to 3.1.
    
    Result
    ------
    SDK now depends on Common.Logging 3.1.
    
    Change-Id: Ic25c1a3d315917aefc1305778cb47a3610a0e461
    Reviewed-on: http://review.couchbase.org/51381
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on May 28, 2015
  1. @Svizel @jeffrymorris

    NCBC-908: Fix connection leak on Memcached bucket dispose

    Svizel authored jeffrymorris committed
    Motivation
    ----------
    Memcached buckets are using HttpStreamingProvider for Couchbase server
    node configuration. This implementation did not properly Dispose
    underlying ConnectionPools instances.
    
    Modifications
    -------------
    Dipose is now called on the IConfigInfo implementation after it is released.
    
    Result
    ------
    Memcached buckets no longer leak resources.
    
    Change-Id: Ia88a6f220e76ebda9dc2ae68ff4064eabc57cb6f
    Reviewed-on: http://review.couchbase.org/51512
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on May 21, 2015
  1. @jeffrymorris

    NCBC-898 - Make NodeUnavailable and TemporaryFailures retriable

    jeffrymorris authored
    Motivation
    ----------
    If a node goes offline, we want to retry operations if we can.
    
    Modifications
    -------------
    NodeUnavailable and TempFailure response status return true for retry.
    
    Results
    -------
    An operation with one of these status's will retried until either it
    completes or timesout.
    
    Change-Id: I1b809286a14cabddd98cd1f012c3d13a451d1d9f
    Reviewed-on: http://review.couchbase.org/51302
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
Commits on May 20, 2015
  1. @jeffrymorris

    Add default NodeAvailableCheckInterval to ClientConfiguration

    jeffrymorris authored
    Motivation
    ----------
    The ClientConfiguration needs a default NodeAvailableCheckInterval so that
    it does not overwhelm the server.
    
    Modifications
    -------------
    Added NodeAvailableCheckInterval and set it to 1000ms (1 second).
    
    Result
    ------
    SDK will wait 1 second before trying to reconnect to a down node by
    default.
    
    Change-Id: Ied35cfe163aa3224138c312a01eee1ad8a434c40
    Reviewed-on: http://review.couchbase.org/51296
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
  2. @jeffrymorris

    NCBC-897: When SendAsync returns synchronously call OnCompleted manually

    jeffrymorris authored
    Motivation
    ----------
    Per MSDN documentation, if Socket.SendAsync returns false, it has
    completed synchronously. In which case we manually need to call
    OnComepleted passing the socket and the SAEA instance.
    
    Modifications
    -------------
    If SendAsync returns false, manually call OnCompleted(socket, args) in
    Connection.
    
    Results
    -------
    If a send completes synchronously, OnCompleted will be called manually.
    
    Change-Id: I915cde9480b5622a278692beaa931ce50c0ca8a0
    Reviewed-on: http://review.couchbase.org/51258
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-896: Support translation between Hostname and IPAddress

    jeffrymorris authored
    Motivation
    ----------
    The IPEndpointExtensions.GetServer(server) method, unlike the other
    overloads, did not correctly handle the case where the passed in hostname
    was not an IPAddress. This patch will correctly resolve the IPAddress of
    the hostname.
    
    Modifications
    -------------
    Updated IPEndpointExtensions.GetServer(server) so that if the value of
    server is a hostname, the IPAddress will be resolved from it.
    
    Results
    -------
    If a cluster is configured to use a hostname as opposed to a IPAddress,
    the SDK will correctly resolve it.
    
    Change-Id: I9de54a354c5f9e5952a0405696c92e596d01017d
    Reviewed-on: http://review.couchbase.org/51237
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on May 18, 2015
  1. @dionoid @jeffrymorris

    NCBC-892: In ClientConfiguration TcpKeepAliveTime and TcpKeepAliveInt…

    dionoid authored jeffrymorris committed
    …erval are switched
    
    Motivation
    ----------
    Default values for TcpKeepAliveTime and TcpKeepAliveInterval are switched
    in Client Configuration, thus the keep alives start after 1s of inactivity.
    
    Modification
    ------------
    Switched around values for TcpKeepAliveTime and
    TcpKeepAliveInterval in ClientConfiguration.cs
    
    Results
    -------
    The TCP keep alives will be sent correctly after 2hrs of inactivity at
    intervals of 1s by default.
    
    Change-Id: I301b4a7079db44a911856697c8191ce08229316d
    Reviewed-on: http://review.couchbase.org/51148
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-893: Ensure VBucket.GetServer does not throw AOOR exceptions

    jeffrymorris authored
    Motivation
    ----------
    In certain cases the indexes of the serverList and cluster may not be in
    sync, this fix ensures that the are before accessing the value of the
    index.
    
    Modifications
    -------------
    Added try/catch and length checks before accessing the value at the index
    provided within the serverLists and cluster arrays.
    
    Results
    -------
    ArgumentOutOfRangeExceptions are handled and a null value returned if a
    server cannot be found to complete the request. The client will try until
    a server is found.
    
    Change-Id: Iabc6e0af9dd4e1abe9ac1b1addede5c1ea592c01
    Reviewed-on: http://review.couchbase.org/51164
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-890: When a node is dropped (e.g. server offline) OPS go to near…

    jeffrymorris authored
    … Zero
    
    Motivation
    ----------
    If a endpoint or cluster suddenly goes offline, for example in the event
    of a service or server crash, the client should continue to succesfully
    make requests to the other still online nodes. If an operation is mapped
    to a down node, it should immediately return an error result with the
    reason.
    
    Modifications
    -------------
    Lots of refactoring around the IServer creation; since we need to allow
    authentication to happen internal to the Server class. The Server class
    has a new state IsDown, which when true will make all operations routed to
    it return a NodeUnavailable ResponseStatus and the exception field will
    contain a NodeUnavailableException.
    
    Result
    -------
    Operations that are mapped to the down node should send a failure to the client with the
    IOperationResult.Exception field populated with a NodeUnavailableException
    and the Status field will be NodeUnavailable. In the event of a down node, the
    client will place the endpoint in a "down" state and it will start a timer and
    try to reconnect at set intervals. If the goes online and the client can
    connect, it will be placed back into an "active" state and continue to
    process requests succesfully. Note that operations sent to a down node
    will not be re-tried and the application could try a replica read if the
    operation was a GET.
    
    Change-Id: Ie3eef8b3eba35ae25f9bc3a8a67179c7729cfe38
    Reviewed-on: http://review.couchbase.org/51012
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on May 16, 2015
  1. @jeffrymorris

    NCBC-885: SDK uses Nodes instead of serverList for VBucket Mapping

    jeffrymorris authored
    Motivation
    ----------
    There is an array of Nodes elements and a serverList of hostnames in the
    cluster map; the SDK uses the index of Nodes element to determine the
    server to send the request to. In some cases the indexes of the nodes and
    serverList are not in-synch, which causes NMVs.
    
    This fix ensures that the index lookup is only for the hostname and then
    the hostname is used to resolve the server from Nodes list.
    
    Modifications
    -------------
    The ConfigContextBase, VBucket and VBucketMapper classes now use a
    Dictionary<string, IServer> to hold the reference to the Server class. The
    key is the hostname, when a key is mapped to a serverList index, the SDK
    uses the hostname provided in the serversList as a key to look up the
    Server object to use to execute the request.
    
    Results
    -------
    Since VBucketMapping and the internal Servers list may change
    independently, this ensures that the correct mapping is used if the index
    of the serversList changes.
    
    Change-Id: I7a5cc22121e307bdf8fc23b37d9f1aec47df57dc
    Reviewed-on: http://review.couchbase.org/50806
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on May 9, 2015
  1. @jeffrymorris

    NCBC-883: NRE when VBucket is null while Logging

    jeffrymorris authored
    Motivation
    ----------
    Some operations do not use VBuckets and a NRE maybe thrown when logging
    and error for one of these operations.
    
    Modifications
    -------------
    Added a logging mehtod which checks if the VBucket is null before logging
    it in RequestExecuter.
    
    Results
    -------
    NRE's are no longer thrown.
    
    Change-Id: Id6776a1f995358530c0f6e8aaf787efdaed39523
    Reviewed-on: http://review.couchbase.org/50791
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-882: Client does not recover from service kill/restart

    jeffrymorris authored
    Motivation
    ----------
    If the Couchbase service crashes or is stopped, the client should
    reconnect and continue to function once the service or node is
    re-started.
    
    Modifications
    -------------
    Added a timer to Server that starts when a dead node is detected and
    checks for the connection to become available again. When it does the
    client puts the node back into rotation. While the node is down, all
    requests routed to it will return a ClientFailure and a ServerException
    with it's IOperationResult. The message returned will be: "The current
    node [HOSTNAME] is down."
    
    Results
    -------
    The client will recover once a down node is re-started.
    
    Change-Id: I7b8493db90332332ef3eda953f4aec9df8c0633f
    Reviewed-on: http://review.couchbase.org/50675
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on May 6, 2015
  1. @jeffrymorris

    Fix order of parameters for DecrementAsync

    jeffrymorris authored
    Motivation
    ----------
    Order of parameters was wrong resulting in invalid results.
    
    Modifications
    -------------
    Swap order of delta and inital parameters in
    MemcachedBucket.DecrementAsync.
    
    Result
    ------
    When a key is decremented, the expected result is returned.
    
    Change-Id: I471215b953c62254575edbf3a9c4bf1e1501db30
    Reviewed-on: http://review.couchbase.org/50619
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-881: Ensure NRE are not thrown during retry

    jeffrymorris authored
    Motivation
    ----------
    During rebalance/swap/failover scenarios an endpoint may not be available
    for the client to execute an operation. This commit uses a backoff
    strategy to wait and try again to acquire an endpoint during the retry
    process.
    
    Modifications
    -------------
    The CallbackFactory classes functors were updated so that they
    use the back off strategy when when acquiring an endpoint (IServer) to
    send the request.
    
    Result
    ------
    If the client cannot acquire an endpoint to send the query, a timeout
    exception will be thrown.
    
    Change-Id: Iad0a7fc5ce6dc826522ace574303b4027fc7bbed
    Reviewed-on: http://review.couchbase.org/50611
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on May 5, 2015
  1. @simonbasle @jeffrymorris

    NCBC-875: implement ExistAsync

    simonbasle authored jeffrymorris committed
    Motivation
    ----------
    Both buckets miss the implementation of ExistAsync method.
    
    Modifications
    -------------
    Implemented ExistAsync in CouchbaseBucket and MemcachedBucket.
    TODO tests.
    
    Result
    ------
    Exist can be called asynchronously.
    
    Change-Id: Ie6d30a3d90ed22df4eace7e119d9dfd2d8bd5354
    
    Conflicts:
    	Src/Couchbase.Tests/CouchbaseBucket_Async_Tests.cs
    	Src/Couchbase.Tests/MemcachedBucket_Async_Tests.cs
    Change-Id: I9165323b67663fe1005a9909fe5de7a533599a6c
    Reviewed-on: http://review.couchbase.org/50617
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @simonbasle @jeffrymorris

    NCBC-877: Implement UnlockAsync method on CouchbaseBucket

    simonbasle authored jeffrymorris committed
    Motivation
    ----------
    Both bucket implementations miss the UnlockAsync overload. MemcachedBucket
    will throw NotSupportedExceptions if these methods are called as memcached
    does not support getl and lock commands.
    
    Modifications
    -------------
    Implemented UnlockAsync on CouchbaseBucket and MemcachedBucket.
    
    Result
    ------
    Unlocking can be done asynchronously.
    
    Change-Id: I4b2571acb5e7e039ded261fef9cdb5c942f23c8b
    Reviewed-on: http://review.couchbase.org/50595
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Something went wrong with that request. Please try again.