Permalink
Commits on Jun 10, 2018
  1. NCBC-1709: Fix bug where instance BucketConfig variable is mutated

    jeffrymorris committed Jun 9, 2018
    Motivation
    ----------
    This fixes a bug introduced in NCBC-1702 where after rebalance the client
    will continue to recieve NMVBs.
    
    Modifications
    -------------
    Use the local bucketConfig variable instead of the class level
    BucketConfig property which is atomically swapped with bucketConfig.
    
    Result
    ------
    Client recovers from swap/rebalance
    
    Change-Id: I296197a7ed502e65de38bb5409cd0d79b710a22f
    Reviewed-on: http://review.couchbase.org/95394
    Reviewed-by: Jaekwon Park <jaekwon.park@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jun 7, 2018
  1. NCBC-1702: ensure VBucketServerMap uses ssl/tls ports when enabled

    jeffrymorris authored and MikeGoldsmith committed Jun 6, 2018
    Motivation
    ----------
    Fixes a bug where during a failover/rebalance scenario when SSL/TLS is
    enabled a KeyNotFoundException is thrown because the ports do not match in
    the key lookup.
    
    Modifications
    -------------
     - Add GetVbuckeServerMap method to BucketConfigExtensions which swaps the
       ports of the server list if UseSsl is enabled.
     - Modified CouchbaseConfigContext to use GetVBucketServerMap to build its
       VBucket mapper.
     - Add unit tests
    
    Result
    ------
    If SSL/TLS is enabled, a failover/rebalance will not result in
    KeyNotFoundExceptions being thrown.
    
    Change-Id: I2026d00a5d0a2631237b360eea3adb05e6ba7a63
    Reviewed-on: http://review.couchbase.org/95270
    Reviewed-by: Jaekwon Park <jaekwon.park@couchbase.com>
    Tested-by: Jaekwon Park <jaekwon.park@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Jun 4, 2018
  1. NCBC-1679: Lock related errors not setting Exception and status

    jeffrymorris committed May 11, 2018
    Motivation
    ----------
    The KV Error Map feature that is available with Couchbase 5.X and a fixed
    bug where the LOCKED status is returned when a key is locked opposed to
    TEMP_FAIL require translation back to 4.X and lower semantics. This commit
    reverts the client back to the pre-5.X error handling so backwards
    compatibility is maintained with applications using older SDKs.
    
    Modifications
    -------------
     - Update OperationBase.GetResponseStatus to translate from LOCKED to
       TEMP_FAIL or KEY_EXISTS depending if operation is a mutation or not.
     - Update OperationHeaderExtensions.GetResponseStatus to allow the actual
       server status to be assigned as a result and then be translated by
       OperationBase.GetHeaderStatus.
     - Add newer response status types to ResponseStatus; some are not meant
       to be used directly by the Sdk but were added for consistency.
     - Add check of KV Error Map's error code to see if it indicates locked or
       not and if so add TemporaryLockFailureException to response.
     - Add unit tests
    
    Result
    ------
    Error handling for locked documents is similar to how it was for 4.X for
    server 5.X+ versions.
    
    See also NCBC-1500
    
    Change-Id: I3f10cec23c52d87c31c8dbaa3190300479c6defc
    Reviewed-on: http://review.couchbase.org/94091
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-on: http://review.couchbase.org/95137
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. NCBC-1676: Race condition when more than one thread access an ssl stream

    jeffrymorris committed May 3, 2018
    Motivation
    ----------
    Fixes a race condition when async methods are used in high-concurrency
    environment using SSL/TLS.
    
    Modifications
    -------------
     - Change signature of SendAsync methods in IConnection to return Tasks instead
       of void.
     - Update Connection, ConnectionBase, MultiplexingConnection and
       SslConnection to reflect changes in IConnection.
     - Update MultiplexingIOService, SharedPooledIOService and PooledIOService
       to await the returned Tasks.
     - Updated tests so that keys are unique for each test so that tests
       running concurrently do not delete keys being used by other tests.
    
    Result
    ------
    In highly concurrent environments using SSL/TLS race condition is no
    longer detected.
    
    Change-Id: Iaa5e79e2fba95929405042972fb1bc3cf6d32043
    Reviewed-on: http://review.couchbase.org/93723
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/95136
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. NCBC-1681: Whenc creating users validate password with user type

    MikeGoldsmith authored and jeffrymorris committed May 8, 2018
    Motivation
    ----------
    When creating a user, there is an option to provide a password. This
    is required when creating a Couchbase (local) user and will be ignored
     if the user an external user.
    
    Modifications
    -------------
    - refactor password checks into switch over domain type
    - add unit tests to verify an exception is thrown if local user and no
    password is provided
    
    Results
    -------
    The password field is correctly validated depending on the user’s
    domain (local vs external).
    
    Change-Id: Icfc317fbe69196f2537c2a13066ce3da577d42b5
    Reviewed-on: http://review.couchbase.org/93876
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/95132
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. NCBC-1680: Capture response message in UserManager

    MikeGoldsmith authored and jeffrymorris committed May 8, 2018
    MOTIVATION
    ----------
    The result.Message property is always false when executing UserManager
    methods. This can cause problems when trying to debug failures.
    
    MODIFICATIONS
    -------------
    - set the result.Message property when processing HTTP response
    
    RESULT
    ------
    The result.Message property is correctly populated with the server
    response.
    
    Change-Id: I1338dcef959b94b9f10fb0cfa9fe2f12b56d9c9f
    Reviewed-on: http://review.couchbase.org/93874
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    (cherry picked from commit 7d57600)
    Reviewed-on: http://review.couchbase.org/95127
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Apr 26, 2018
  1. NCBC-1642: Ensure all async code configures an awaiter

    jeffrymorris authored and MikeGoldsmith committed Apr 23, 2018
    Motivation
    ----------
    There are still several async code paths where ConfigureAwait(false) is
    not used. These awaiter should be configured appropriately so that
    deadlocks do not occur.
    
    Modifications
    -------------
    Call ContinueOnAnyContext in various places where code is awaited. Note
    this does not cover unit and integration tests because the cannot deadlock
    in this manner - ASP.NET can however.
    
    Result
    ------
    Removes possibility of deadlocks in ASP.NET applications when awaited
    methods internally within the SDK.
    
    Change-Id: I52a2192d0fc44815fc627110636cedba84f95a86
    Reviewed-on: http://review.couchbase.org/93134
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/93382
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
  2. NCBC-1670: Dispose of syncstate pool when closing mux connection

    MikeGoldsmith committed Apr 25, 2018
    MOTIVATION
    ----------
    MultiplexingConnections contain a reusable queue of SyncStat's with
    each SyncState having a AutoResetEvent which is not disposed correctly
    when the connection is closed / disposed. The AutoResetEvent property
    consumes system resources and should be disposed.
    
    MODIFICATIONS
    -------------
    - add IDisposeable to IState
    - add Dispose implementation to SyncState and AsyncState
    - move states in flight clean up to outside of Socket != null check
    - dequeue / dispose sync state when disposing from
      MultiplexingConnection
    
    RESULT
    ------
    The multiplexing connection's sync state pool is disposed correctly
    when the connection is disposed.
    
    Change-Id: I884c0ed45546568393c4a3c96ec3ad8f77611331
    Reviewed-on: http://review.couchbase.org/93287
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/93339
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
  3. NCBC-1665: Reset SyncState’s event signal on clean

    MikeGoldsmith committed Apr 24, 2018
    MOTIVATION
    ----------
    The SyncState is designed to be reused between operations and includes
    an AutoResetEvent to signal when it has completed. However, the event is
    not reset during clean up and should be.
    
    MODIFICATIONS
    -------------
    - call AutoResetEvent.Reset during clean up
    
    RESULT
    ------
    The SyncState has been fully reset ready for the next usage.
    
    Change-Id: Ibea012e1f16cced9620627de8a8c0c926ab28d24
    Reviewed-on: http://review.couchbase.org/93189
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/93333
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Apr 24, 2018
  1. NCBC-1669: Consolidate ContinueOnAnyContext usage

    MikeGoldsmith authored and jeffrymorris committed Apr 24, 2018
    MOTIVATION
    ----------
    There is a utility function to configure a given task to not resume with
    the current context, ContinueOnAnyContext. There are some usages in the
    codebase that do not use this and it is desirable to have consistent
    usage.
    
    MODIFICATIONS
    -------------
    - update any direct usage of ConfigureAwait(false) to use the
      ConfigureOnAnyContext utility function
    
    RESULT
    ------
    The usage of ConfigureOnAnyContext is used consistently throughout the
    codebase.
    
    Change-Id: I4a585d84e919c0140af7562df4ac095278a9fbf5
    Reviewed-on: http://review.couchbase.org/93193
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-on: http://review.couchbase.org/93249
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. NCBC-1625: Refactor operation header length usage

    MikeGoldsmith authored and jeffrymorris committed Apr 24, 2018
    Change-Id: Ie58981f913df3c3e992160b073250ca54b969bd5
    Reviewed-on: http://review.couchbase.org/93192
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/93247
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. NCBC-1646: Add FTS index management API support

    MikeGoldsmith authored and jeffrymorris committed Apr 3, 2018
    MOTIVATION
    ----------
    Full text search indexes can be managed via a REST interface and should
    be exposed via the SDK. Primarily to support create, get, delete and get
    document counts.
    
    MODIFICATIONS
    -------------
    - Add System.ComponentModel.Primitives nuget dependency for netstandard
      1.5 / 2.0
    - Add ISearchIndexManager with method definitions, plus supporting class
      and enums
    - Add interface to ClusterManager with implementations
    - Add integration tests to verify behaviour (note partition tests are
      currently ignored)
    
    RESULT
    ------
    FTS indexes can be managed using the ClusterManager class with options
    to create, get, delete and get document counts.
    
    Also includes experimental support to control ingestion, query and plan
    freeze modes; plus support for getting partition indexes and partition
    index document counts.
    
    Change-Id: I88c4e6ccbd1bfac378d80e1429f4b8d273684de7
    Reviewed-on: http://review.couchbase.org/92051
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-on: http://review.couchbase.org/93245
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. NCBC-1664: Only include net45 target on Windows

    MikeGoldsmith authored and jeffrymorris committed Apr 17, 2018
    MOTIVATION
    ----------
    The Couchbase SDK targets net45 which is only available on Windows
    hosts. This prevents the Couchbase library from being built on
    non-Windows (eg OSX).
    
    MODIFICATIONS
    -------------
    - move the net45 target framework to a property group with a condition
      of OS being Windows
    
    RESULT
    ------
    The net45 framework is only used when building on a Windows host. This
    allows the Couchbase SDK to be built on non-windows.
    
    Change-Id: Ia586a567d0643b817dbbb5000e1bc5144ac5efde
    Reviewed-on: http://review.couchbase.org/92863
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-on: http://review.couchbase.org/93237
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  5. NCBC-1647: Add Profile N1QL Query Parameter

    jeffrymorris committed Mar 31, 2018
    MOTIVATION
    ----------
    Couchbase Server 5 added N1QL profiling where timing or phases
    information can be returned with the query payload. This functionality
    should be added to the SDK to enable application developers to request
    this data too.
    
    MODIFICATIONS
    -------------
    - add Profile() to QueryRequest and QueryProfile enum (off,
      phases, timing)
    - add Profile to IQueryResult to contain server result
    - read profile during streamed and non-streamed result processing
    - add integration tests for each enum value for both streamed and
      non-streamed queries (only available from server 5.0+)
    
    RESULT
    ------
    Query requests can include a profile type and expose the server response
    value.
    
    Change-Id: I5ee1bb672817fd0815049e68a866bd645d45e34a
    Reviewed-on: http://review.couchbase.org/91934
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    (cherry picked from commit 50825af)
    Reviewed-on: http://review.couchbase.org/93232
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  6. NCBC-1564: Update SearchException to use result message

    MikeGoldsmith authored and jeffrymorris committed Apr 19, 2018
    MOTIVATION
    ----------
    When creating a CouchbaseSearchResponseException, the
    ISearchQueryResult's first error is used to generate the exception
    message. However, this does not represent all the errors that have
    occurred. The result.Message property should be used instead.
    
    MODIFICATIONS
    -------------
    - use the result.Message property when building the error message
    
    RESULT
    ------
    The error message of the CouchbaseSearchResponseException is set using
    the ISearchQuryResult.Message property not the first error.
    
    Change-Id: I29ebbc32163e3b31053e18078c7928c38ce2a99a
    Reviewed-on: http://review.couchbase.org/92978
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    (cherry picked from commit 6c3a8ac)
    Reviewed-on: http://review.couchbase.org/93231
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  7. NCBC-1631: Manage SyncState with Concurrent queue

    MikeGoldsmith authored and jeffrymorris committed Apr 18, 2018
    MOTIVATION
    ----------
    The SyncState queue in MultiplexingConnection utilises a custom lock on
    the queue object. This can be simplified to use a ConcurrentQueue
    instead.
    
    MODIFICATIONS
    -------------
    - replace Queue<SyncState> with Concurrent<SyncState>
    - remove custom lock code around enqueue / dequeue processing
    
    RESULT
    ------
    The SyncState queue has now a concurrent queue that manages the lock
    internally and the code to retrieve an item has been simplified.
    
    Change-Id: I9b518335ce1aa2b85f2752909937fb1740eab05f
    Reviewed-on: http://review.couchbase.org/92884
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    (cherry picked from commit 8b6b7ab)
    Reviewed-on: http://review.couchbase.org/93228
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  8. NCBC-1571: Update memcache bucket manager messages

    MikeGoldsmith authored and jeffrymorris committed Apr 19, 2018
    MOTIVATION
    ----------
    The Memcached bucket manager returns error messages when trying to use
    unsupported operations (eg create N1QL index), however the messages does
    not indicate the Ephemeral buckets can also utilise that operation.
    These messags should be updated to be more accurate.
    
    MODIFICATIONS
    -------------
    - update error messages to indicate both couchbase and ephemeral bucket
      types
    
    RESULT
    ------
    The error messsages returned by MemcachedBucektManager correctly
    indicate n1ql based operations are available for both Couchbase and
    Ephemeral bucket types.
    
    Change-Id: Icb5f8a7bd5c283b2507d8cf12d3714ed05989351
    Reviewed-on: http://review.couchbase.org/92977
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    (cherry picked from commit f68c268)
    Reviewed-on: http://review.couchbase.org/93227
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  9. NCBC-1666: Bad Authentication Causes Connection Leak

    jeffrymorris committed Apr 18, 2018
    Motivation
    ----------
    If the password for a user changes on the server, any clients that are
    connected will not be able to create connections until the password is
    also updated on the client. When this happens, the client will try to
    reconnect every several seconds; if it cannot connect the socket must be
    closed of else it will leak and the connection count on the server will
    increase. This patch fixes a bug where the socket was not disposed when
    authentication failed.
    
    Modification
    ------------
    Close of the connection if it cannot authenticate before throwing
    exception.
    
    Result
    ------
    Server connections do not increase over time in the described situation.
    
    Change-Id: I5bff93b0db1ce5b7ab1ba7653510ee2704fd6204
    Reviewed-on: http://review.couchbase.org/92948
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    (cherry picked from commit 9e4746f)
    Reviewed-on: http://review.couchbase.org/93225
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Apr 3, 2018
  1. NCBC-1552: Support X509 authentication for Query and FTS Services

    jeffrymorris authored and MikeGoldsmith committed Mar 30, 2018
    Motivation
    ----------
    Allows for authentication via x509 certificates as supported by Couchbase
    Server 5.5 for Query (N1QL) and Full Text Search (FTS) services.
    
    Modifications
    -------------
     - Cert authentication is cluster-level; so remove and refactor
       CertificateFactory and EnableCertificateAuthentication from
       BucketConfiguration to ClientConfiguration
     - Retrieve and add certificates to the handler in CouchbaseHttpClient if
       x509 is enabled.
     - Update NodeAdapter et al to retrieve the FtsSSL port from the cluster
       map.
    
    Result
    ------
    X509 certificate authentication is supported for Query and FTS.
    
    Change-Id: I795ff65a360369b8e2902052d7196ea82b6ef688
    Reviewed-on: http://review.couchbase.org/91888
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
Commits on Mar 30, 2018
  1. NCBC-765: Support the couchbase:// connection string

    brantburnett authored and jeffrymorris committed Mar 5, 2018
    Motivation
    ----------
    Support the common connection string standard as implemented by other
    Couchbase SDKs.
    
    Modifications
    -------------
    Added ConnectionString class for parsing and handling connection
    strings.
    
    Added ConnectionString property to both XML and JSON configurations.
    
    When ConnectionString property has a value, use it to override various
    settings in ClientConfiguration instead of taking the values from the
    individual properties in ICouchbaseClientDefinition.
    
    Implemented unit and integration tests.
    
    Results
    -------
    Most of the features of the spec
    (https://github.com/couchbaselabs/sdk-rfcs/blob/master/rfc/0011-connection-string.md)
    have been implemented.  If the connection string is present, it will
    take precedence over any individual settings.
    
    Settings overridden:
    1. Servers
    2. UseSsl
    3. DirectPort
    4. SslPort
    5. ConfigurationProviders
    
    Features not yet implemented:
    1. Varying port numbers per host, they must currently all use the same
    port or not specify a port at all.
    2. DNS SRV discovery
    3. Options (status on RFC is unclear, present in Google Doc but not
    GitHub)
    
    If the ConnectionString property is null or empty, it is ignored and
    existing behavior for configuration and bootstrapping is unchanged.
    
    Change-Id: Ia7189ce4e96c3326cae9131ec0d63e98ec1825e1
    Reviewed-on: http://review.couchbase.org/90454
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. NCBC-1651: SDK throws parse exception when geopoint field is read in …

    jeffrymorris committed Mar 22, 2018
    …response
    
    Motivation
    ----------
    
    If a geopoint type field is defined in an index, the response will fail
    with: "Error reading string. Unexpected token: StartArray. Path
    'fields.geo', line 1, position 413."
    
    The reason is because the client expects the fields to be an array of
    key/value strings; however, the value type for a geopoint Type is an array
    of latitude/longitude which are numeric values:
    
    "fields":{"geo":[9.15199995719641,41.38676998936262],"name":"Santateresa"}}
    
    Modifications
    -------------
     - Change SearchQueryRow.Fields from Dictionary<string, string> to
       Dictionary<string, dynamic>.
    
    Results
    -------
    The field type will be dynammic and thus support all of different types
    supported by field mapping: geopoint, string, boolean, and datetime. Note
    that this is a breaking change, but I don't believe the other option of
    converting everything to a string is the best solution.
    
    Change-Id: I2947e21d5ab7166ee0e64de9dd8783cf4ef18a6f
    Reviewed-on: http://review.couchbase.org/91381
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Matthew D. Groves <me@mgroves.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Mar 26, 2018
  1. NCBC-1591: Add Newtonsoft helper Unix epoch milliseconds attrs

    brantburnett authored and MikeGoldsmith committed Mar 16, 2018
    Motivation
    ----------
    Two very common ways of serializing date/times to JSON in Couchbase are
    ISO 8601 and Unix epoch milliseconds.  The default behavior for the .NET
    SDK is ISO 8601, but an easy and standardized way for developers to use
    Unix timestamps would be useful.  This method could then be detected by
    Linq2Couchbase to adjust query behavior.
    
    Modifications
    -------------
    Added UnixMillisecondsConverter, a Newtonsoft JsonConverter, and
    supporting unit tests.
    
    Results
    -------
    Developers may apply the converter to any DateTime attribute, or
    globally in their JsonSerializerSettings.
    
    ```cs
    [JsonConverter(typeof(UnixMillisecondsConverter))]
    public DateTime Timestamp { get; set; }
    ```
    
    This results in both serializing and deserializing the property as
    milliseconds since the Unix epoch.  Conversion to UTC is handled
    automatically for local times.  Fractions of a millisecond are
    preserved, up to the resolution of TimeSpan.TotalMilliseconds.
    
    This attribute may then be detected by Linq2Couchbase to adjust query
    generation for this properties.
    
    Change-Id: I2b98799edbc0637b608cb55dc5cf6b53c33c1890
    Reviewed-on: http://review.couchbase.org/91085
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Mar 17, 2018
  1. NCBC-1645: Make SDK use OpenTracing.Signed v0.10.4

    jeffrymorris committed Mar 16, 2018
    Motivation
    ----------
    The assembly name for OpenTracing.Signed v0.10.2 does not match the
    package name and will fail at runtime when .NET tries to load it. This
    patch ensures that the SDK uses OpenTracing.Signed v0.10.4 which has the
    correct assembly name.
    
    Modification
    ------------
     - Change dependency on OpenTracing.Signed from v0.10.2 to v0.10.4
    
    Result
    ------
    The runtime will be able to find the OpenTracing.Signed assembly and load
    it correctly.
    
    Change-Id: I098972b4db0dda25cf5d9a2dc35af7c14c6f59ef
    Reviewed-on: http://review.couchbase.org/91127
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
Commits on Mar 16, 2018
  1. NCBC-1643: Dependency on OpenTracing v0.10.0 throws exception in v2.5.6

    jeffrymorris authored and MikeGoldsmith committed Mar 16, 2018
    Motivation
    ----------
    The dependency on OpenTracing v0.10.0 throws a TypeInitializationException
    with the message: A strongly-named assembly is required. This patch
    configures the SDK to use a special OpenTracing nuget package that is
    signed with the Couchbase SDK strong name keys.
    
    Modifications
    -------------
     - Add NuGet dependency to OpenTracing.Signed 0.10.2
    
    Result
    ------
    The SDK will pull and use a special signed version of OpenTracing.
    
    Change-Id: I3c9ed9f3cf55e44d86b340065ff7bb259689e679
    Reviewed-on: http://review.couchbase.org/91053
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Mar 13, 2018
  1. NCBC-1639: Don’t add custom tags to NullSpans

    MikeGoldsmith authored and jeffrymorris committed Mar 13, 2018
    MOTIVATION
    ----------
    TracerExtensions add additional custom tags to spans during construction
    of the spans. However, it is inefficient to add the custom tags if
    tracing is disabled and the span type is NullSpan. If a NullSpan is
    created, no additional tags should be added to the span and it should be
    returned as fast as possible.
    
    MODIFICATIONS
    -------------
    - Add checks for NullSpan when creating spans in TracerExtensions, if a
      NullSpan don't add extra tags and return span directly
    
    RESULT
    ------
    When a NullSpan is created using the ISpanBuilder, custom tags are now
    added to the span.
    
    Change-Id: Iea222de53c1a76baecc2154621fae4af4c7f786f
    Reviewed-on: http://review.couchbase.org/90878
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. NCBC-1640: Update encrypted Nuget API Key

    MikeGoldsmith authored and jeffrymorris committed Mar 13, 2018
    MOTIVATION
    ----------
    Nuget API keys used to publish packages have a limited time duration.
    The current API key has expired and needs to be replaced with a valid
    one.
    
    MODIFICATIONS
    -------------
    - update the encrypted nuget API key in appveyor.yml
    
    RESULT
    ------
    The API key used to publish nuget packages to nuget.org has been updated
    to a valid key.
    
    Change-Id: I13f2ffd57f98b75e0a76191bb3534cfb8b95e778
    Reviewed-on: http://review.couchbase.org/90879
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. NCBC-1638: When remote connection drops, sdk throws unhandled excepti…

    jeffrymorris committed Mar 13, 2018
    …on w/async KV
    
    Motivation
    ----------
    If the remote host is no longer reachable, the SDK will throw an uncaught
    exception crashing the calling application. The SDK should catch the
    exception and return it with the response.
    
    Modifications
    -------------
     - Added RemoteEndpoint property to IConnection and implement in
       ConnectionBase.
     - Change TraceExtensions.BuildSpan to use the EndPoint property instead
       of the underyling socket.Endpoint which will fail if the socket has
       been disposed.
    
    Result
    ------
    The SDK will no longer throw unhandled exceptions.
    
    Change-Id: I5273257aa6d5ac0d4db4c9364347c42dd4fbb4ba
    Reviewed-on: http://review.couchbase.org/90826
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jaekwon Park <jaekwon.park@couchbase.com>
    Tested-by: Jaekwon Park <jaekwon.park@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Mar 8, 2018
  1. NCBC-1635: Default tracing / orphaned operation logging to disabled

    MikeGoldsmith committed Mar 7, 2018
    MOTIVATION
    ----------
    Tracing and orphaned response logging is a new feature for the SDK but
    should not be enabled by default for 2.5 series of SDK.
    
    MODIFICATIONS
    -------------
    - set both tracing and orphaned response to default to false in
      ClientConfiguration
    
    RESULT
    ------
    Both tracing and orphaned response logging is disabled for 2.5 series of
    the SDK releases.
    
    NOTE: From 2.6.0, tracing and orphaned response logging will be enabled
    by default.
    
    Change-Id: Ib6770a801bb6b3c1bc40c64d4d97db8270e51003
    Reviewed-on: http://review.couchbase.org/90608
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
  2. NCBC-1628: Add support for N1Ql raw parameters

    MikeGoldsmith authored and jeffrymorris committed Feb 6, 2018
    MOTIVATION
    ----------
    Sometimes new N1QL query parameters are added before the SDK can be
    updated or there are some undocumented parameters. To support this,
    there should be a way to add raw parameters with a name and value to
    a query.
    
    MODIFICATIONS
    -------------
    - add RawParameter(name, value) to IQueryRequest and QueryRequest
    - update QueryRequest store raw parameters and append to output sent to
      query service
    - add unit test to ensure raw parameters are stored in output that is
      sent to query service
    
    RESULT
    ------
    Raw parameters with values can be added to n1ql queries.
    
    NOTE: This has been added as an uncommitted feature until SDKs converge
    on an agreed name (Raw vs Custom).
    
    Change-Id: Ieeb9bb43c016ceba954c4324aca92975d5cb2580
    Reviewed-on: http://review.couchbase.org/88922
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
Commits on Mar 7, 2018
  1. NCBC-1558: bootstrapping fails for memcd bucket when using couchbase …

    jeffrymorris committed Feb 15, 2018
    …protocol
    
    Motivation
    ----------
    If booting strapping to a memcached bucket and using the couchbase scheme
    protocol, HttpClient will fail because it only supports HTTP and HTTPS
    schemes. This patch replaces the couchbase protocol scheme with HTTP or
    HTTPs.
    
    Modifications
    -------------
     - Added ReplaceCouchbaseSchemeWithHttp method to UriExtensions
     - Added code to replace couchbase schemes with HTTP schemes in
       HttpServerConfig
     - Added integration test for bootstrapping
     - Added unit tests to verify behaviour
    
    Result
    ------
    Bootstrapping to Memcached buckets using URI's with the couchbase scheme
    will succeed.
    
    Change-Id: I08e68d77cd103560825c70f5602da8af2856c3cb
    Reviewed-on: http://review.couchbase.org/89455
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
  2. NCBC-1604: Make tests use the `basic` setting in testSettings in conf…

    jeffrymorris committed Dec 7, 2017
    …ig.json
    
    Motivation
    ----------
    Previously the default test configuration was for `multiplexio` which is
    now the default IO service. Using the `basic` configuration will default
    the tests to using the client defaults for the IO Service.
    
    Modification
    ------------
     - Change the `current` setting in testSettings to `basic`.
    
    Result
    ------
    The integration tests will be run with the default IO service model.
    
    Change-Id: I7234d5424286a19419fe9ec67da6deddb6d3019d
    Reviewed-on: http://review.couchbase.org/86492
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Commits on Feb 26, 2018
  1. NCBC-1616: Track and log correlation details in Timeout Exceptions

    MikeGoldsmith committed Feb 26, 2018
    MOTIVATION
    ----------
    When a timeout occurs it would be beneficial to have additional details
    related to the operation logged and added to the exception returned to
    the application. The additional details should include: service type,
    correlation ID, local endpoint, operation timeout and remote endpoint.
    
    MODIFICATIONS
    -------------
    - Add CreateTimeoutException to ConnectionBase - this constructs the
      message that is both logged and used in the SendTimeoutException
    - Update MultiplexingConnection (async & sync) to use
      CreateTimeoutException
    - Update Connection & SslConnection sync paths to use
      CreateTimeoutException
    
    RESULT
    ------
    When a timeout happens, additional correlation details are added to the
    SendTimeoutException to aid with cause analysis.
    
    NOTE: Both Connection and SslConnection async paths do not currently
    capture timeout exceptions.
    
    Change-Id: I074c2a745f26c33030fbe64e30d5129ad937e2a0
    Reviewed-on: http://review.couchbase.org/90060
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
  2. NCBC-1616: Add license to tracing files

    MikeGoldsmith committed Feb 22, 2018
    MOTIVATION
    ----------
    As part of adding the per-operation tracing API, the license region was
    massing. This commit adds the license region to each file.
    
    MODIFICATIONS
    -------------
    - add file to to bottom of each newly added file
    
    RESULT
    ------
    The license is present in each file.
    
    Change-Id: I534eea5d618f43e6b5b3c57a49c7cc19061a6a9e
    Reviewed-on: http://review.couchbase.org/89913
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
  3. NCBC-1616: Send connection ID to HTTP services in custom header

    MikeGoldsmith committed Jan 29, 2018
    MOTIVATION
    ----------
    When sending requests to the HTTP services (N1QL, FTS, etc), the
    connection ID should also be sent in the headers for additional context.
    
    NOTE: These headers are not yet used, but may be in the future.
    
    MODIFICATIONS
    -------------
    - Add utility method to ClientIdentifer to format the Instance and
      connection IDs into the correct format
    - Update HTTPServiceBase to generate random ulong instad of GUID per
      service
    - Update IOServiceBase to reuse FormatConnectionId method instead of
      copying it
    - Update tests to verify behaviour
    
    RESULT
    ------
    When HTTP servies send requets, a connection ID HTTP header is included.
    
    Change-Id: Ifdf8bf9625e348debba3464052e11be09c419119
    Reviewed-on: http://review.couchbase.org/88503
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
Commits on Feb 22, 2018
  1. NCBC-1632: Add ErrorMap to async state object

    MikeGoldsmith committed Feb 16, 2018
    MOTIVATION
    ----------
    An error map is not available when processing async responses. This is
    required to understand new status codes and also pass back retry
    behaviour.
    
    MODIFICATIONS
    -------------
    - Add ErrorMap property to AsyncSocketState and AsyncState
    - Pass the ErrorMap to state objects in Connection, SslConnection and
      MultiplexingConnection
    - Use the ErrorMap when creating the header in OperationHeaderExtensions
    
    RESULT
    ------
    An ErrorMap is available to use when processing async responses.
    
    Change-Id: Icdacd7d5a4240bddb13dba0d61129ef40c00d758
    Reviewed-on: http://review.couchbase.org/89552
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>