Permalink
Commits on Jul 20, 2017
  1. NCBC-1323: Update CI version and lower build verbosity

    MOTIVATION
    ----------
    The build version is set when executing build.ps1, however the original
    CI build number is retained even though they can be very different.
    
    The build output is very verbose, we can lower verbosity with a msbuild
    switch.
    
    MODIFICATIONS
    -------------
    - update CI build number to be the same as build.ps1 output
    - set msbuild verbosity to quiet
    
    RESULT
    ------
    The output during CI builds is not as verbose.
    
    Change-Id: Idbb08b23023e9ffc134249aba1e872d23f259b64
    Reviewed-on: http://review.couchbase.org/81188
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed with jeffrymorris Jul 20, 2017
  2. NCBC-1470: Fix RemoveAsync() with durability options

    Change-Id: I295c72741ca3b7dc2e07d81cb0242bfd4747c566
    Reviewed-on: http://review.couchbase.org/81180
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    mattcarabine committed with jeffrymorris Jul 20, 2017
  3. NCBC-1453: Use JSON transcoder when reading updated bucket config

    MOTIVATION
    ----------
    It possible to configure a custom document content transcoder where the
    transcoder is responsible for encoding and decoding document bodies.
    However, if a NotMyVBucket response is received from the server, this
    transcoder is used to try and decode the updated bucket config. This is
    dangerous because the custom transcoder may not work with JSON and the
    response will always be JSON.
    
    MODIFICATIONS
    -------------
    - Add an overload to IOperation.GetConfig that takes an ITypeTranscoder
      to be used for decoding the response body
    - Overload the new method on OperationBase to use the transcoder
      parameter instead of the content transcoder
    - Add ServerConfigTranscoder to IClusterController & ClusterController
      that internall resolves to a DefaultTranscoder
    - Update all internal usage of GetConfig to use the transcoder in
      IClusterController
    - Add unit tests to verify behaviour for both method variants
    
    RESULT
    ------
    When a NotMyVBucket response is received, the SDK will use a JSON
    transcoder to decode the response instead of the custom transcoder.
    
    Change-Id: Ic2d0aa63653947070a7b8e18c378ce2b35386d81
    Reviewed-on: http://review.couchbase.org/80524
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    MikeGoldsmith committed Jul 11, 2017
  4. NCBC-1323: Update appveyor to support VS2017 projects

    MOTIVATION
    ----------
    After the VS 2017 project file update, the appveyor config requires
    updating to allow it to successfully build the solution.
    
    MODIFICATIONS
    -------------
    - update appveyor.yml to use a local build script instead of inline
      commands
    - add build.ps1 that determines version, decrpyts snk, updates
      assemblyinfo.cs and builds the project
    - add AutoVersionNumber.ps1 to support working out next version
    
    RESULT
    ------
    The updated project can now be built and auto increments it's version
    without requiring updating.
    
    Change-Id: I30f7a1dba5d34448eab2836d0f2e7edce2a40692
    Reviewed-on: http://review.couchbase.org/80924
    Reviewed-by: Brant Burnett <bburnett@centeredgesoftware.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    MikeGoldsmith committed Jul 14, 2017
  5. NCBC-1468: Update Couchbase so that it can be use by SDKD and VS2017

    Motivation
    ----------
    A few minor changes required for SDKD.NET so that it can run siti tests
    against Core/Full.
    
    Modifications
    -------------
     - Remove conditional compilation for internalInvisibleTo
     - Remove csproj elements for creating attributes; this keeps the
       IDE/tooling from generating duplicate attributes and failing on build.
    
    Results
    -------
    SDKD.NET can use the correct CLR version for testing.
    
    Change-Id: I8053751482a3f88e07931d04657616f78e264e0e
    Reviewed-on: http://review.couchbase.org/81144
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris Jul 20, 2017
  6. NCBC-1465: Don’t use 127.0.0.1 as default for NodeExt.Hostname

    MOTIVATION
    ----------
    As part of NCBC-1457, a default value of 127.0.0.1 was added to
    NodeExt.Hostname when being instantiated. However, the NodeAdapater was
    checking for a null value and replacing the valid hostname. This has the
    side-effect that if a single-node cluster was setup without setting the
    hostname during setup, the SDK fails to connect to it and attempts to
    connect to 127.0.0.1.
    
    MODIFICATIONS
    -------------
    - Remove the NodeExt.Hostname default
    - Update unit tests to expect Node.Hostname to not have a default value
    
    RESULT
    ------
    NodeExt does not default to 127.0.0.1 and prevent Node.Hostname being
    using. This enables the SDK to connect to single-node clusters where the
    default hostname has not been changed from 127.0.0.1.
    
    Change-Id: Ib88ac10fb385d9b1bdeb6c529cea2fd38a4cdce2
    Reviewed-on: http://review.couchbase.org/80599
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed Jul 12, 2017
Commits on Jul 11, 2017
  1. NCBC-1323: VS2017 csproj conversion

    MOTIVATION
    ----------
    Visual Studio 2017 has introduced a new format for the csproj files that
    better supports multi-target projects, eg net45 and netstandard1.3. The
    new file format also is more concise and allows better control of
    resources and configurations. It is also required to use VS 2017.
    
    MODIFICATIONS
    -------------
    - Upgrade Couchbase, Couchbase.Tests, Couchbase.UnitTests and
      Couchbase.IntegrationTests to new csproj format
    - Remove NetStandard version of projects
    - Update each AssemblyInfo to remove redundant entries
    - Add missing properties to test implementations of IConnectionPool and
      IConnection in Couchbase.Tests
    
    RESULT
    ------
    The project files are now in the new VS2017 compliant standard.
    
    Change-Id: I96fbc7e2dee5c9d3950f7e42945c5b71d5714502
    Reviewed-on: http://review.couchbase.org/77227
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    brantburnett committed with MikeGoldsmith Apr 23, 2017
Commits on Jul 6, 2017
  1. NCBC-1459: AuthenticationException when BucketConfiguration.MinSize is 0

    Motivation
    ----------
    Fixes a threading bug where a connection might be authenticated
    simulataneously many times causing auth to fail.
    
    Modifications
    -------------
     - Remove uneeded auth code when a connection is "released" in the SharedConnectionPool.
     - Re-arrange Initialize() call in CouchbaseConfigContext and
       MemcachedConfigContext so its called after assigning the SaslMechanism
    
    Results
    -------
    Authentication is now synchronized by exsiting code.
    
    Change-Id: I6b99843ed1cb178ba5ae979b8f0e57c50e2de66f
    Reviewed-on: http://review.couchbase.org/80282
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    jeffrymorris committed with jeffrymorris Jul 5, 2017
  2. NCBC-1457: Add test to verify bucket config with missing hostname

    MOTIVATION
    ----------
    When parsing bucket config, the node ext list should have a default
    hostname and recognise services are enabled.
    
    MODIFICATIONS
    -------------
    - add unit test and json fragment to verify node ext hostname and
      services
    
    RESULT
    ------
    Test has been added to verify behaviour.
    
    Change-Id: Ic2e18bcc4b680a2937b09cc80ad1def2c43b8721
    Reviewed-on: http://review.couchbase.org/80221
    Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    MikeGoldsmith committed Jul 3, 2017
Commits on Jul 5, 2017
  1. NCBC-1458: KeyNotFoundException when UseEnhancedDurability is true

    Motivation
    ----------
    Fixes a bug introduced by NCBC-1442 where enhanced durability is set at
    the IOService level, but needs to be set per connection.
    
    Modification
    ------------
     - Added MustEnableServerFeatures to IConnection and ConnectionBase
     - Check per connection if flag is set
     - If not set, do the HELLO command
    
    Results
    -------
    All connections are correctly set with the server features that they are
    compatibly with.
    
    Change-Id: I5868bb8b6a13a604d0310d1e850031b672b48408
    Reviewed-on: http://review.couchbase.org/80281
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris Jul 5, 2017
Commits on Jun 30, 2017
  1. NCBC-1456: RBAC user full name should be optional

    MOTIVATION
    ----------
    The name property used when creating an RBAC user should be optional and
    only be set in the form values if it is set.
    
    MODIFICATIONS
    -------------
    - Don't enforce the name property to be required
    - Only add the name property to the form values if it's set
    - Add test cases to verify name of null, empty string and a real value
    
    RESULT
    ------
    The name property when using UpsertUser is now optional and is only set
    in the request form values if it is set.
    
    Change-Id: I59448a739237ef5325f86d749f4f6eb42aae8a08
    Reviewed-on: http://review.couchbase.org/80099
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed Jun 28, 2017
  2. NCBC-1451: ensure SelectBucket is called for every socket w/rbac

    Motivation
    ----------
    When RBAC is used with 5.0 and greater clusters, SelectBucket operation
    must be called on every connection made to the server or an UnknownError
    will be returned for any K/V operations. This also applies to connections
    created after bootstrapping - for example in the case that a node is
    swapped in and the cluster rebalanced.
    
    Modifications
    -------------
    In order to make this work, some refactoring/layering of existing code had
    to be done. Also, some new properties for passing bucketName and the
    connections state were added. I would consider this a temporary fix and a
    more elegant solution should be considered in the future.
    
     - Added BucketName property to PoolConfiguration so that it can be passed
       into SelectBucket from the connection
     - Moved the SelectBucket code from the CCCP provider to the connection
       level.
     - Added CheckedForEnhancedAuthentication property to the connection so we
       can bypass the SelectBucket operation after its been checked.
     - Added SupportsEnhancedAuthentication property to ConnectionBase and
       IConnectionPool
     - Added code to set the SupportsEnhancedAuthentication property in the
       CTOR of SharedPooledIOService
     - Override IConnectionPool.Connections in SharedConnectionPool
     - "Fixed" SSL and RBAC
    
    Results
    -------
    When using RBAC SelectBucket is now called on every connection.
    
    Change-Id: I76d4a7aca20e2a68974f818a28a0255bcc3b805f
    Reviewed-on: http://review.couchbase.org/80149
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris Jun 29, 2017
Commits on Jun 28, 2017
  1. NCBC-1455: Remove weird string from KV Error Tests

    MOTIVATION
    ----------
    There is some unreadable text in a comment for KV Error Tests. This is
    not meant to be there and should be removed.
    
    MODIFICATIONS
    -------------
    - Remove strange text in KVErrorMapTests IntegrationTests
    
    RESULT
    ------
    There is no unreadable text in the test file.
    
    Change-Id: I03da1c8472c3884602bdaa2215d4960753665e9c
    Reviewed-on: http://review.couchbase.org/80098
    Reviewed-by: Brett Lawson <brett19@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    MikeGoldsmith committed Jun 28, 2017
Commits on Jun 27, 2017
  1. NCBC-1448: Updates for User Management API

    MOTIVATION
    ----------
    There have been some updates to the User Management API, in particular
    the API path has been amended and a new GetUser endpoints. These
    changes need to be applied to the current implementation.
    
    MODIFICATIONS
    -------------
    - Update API path to always include '/local'
    - Add GetUser and GetUserAsync to IUserManager and implementation in
      CluseterManager
    - Update User to user JsonProperty instead of internal class to be the
      same as Role
    - Update ClusterManager method that builds URI to use UriBuilder instead
      of StringBuilder
    - Add unit and integration test for new functionality
    - Update existing unit and integration tests for updated API path
    
    RESULT
    ------
    The user management functionality works as expected to create, get all
    users, get single user and remove user.
    
    Change-Id: Ife30bdc521587d1adcad796c16151ff7da459251
    Reviewed-on: http://review.couchbase.org/80012
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed Jun 26, 2017
  2. NCBC-1340: Add KV error map retries

    MOTIVATION
    ----------
    As part of the KV Error Map feature, retry strategies will be provided
    and should be used to handle failed operations. The retry strategies
    will form part of the Error Map provided by the server.
    
    MODIFICATIONS
    -------------
    - Extend ErrorMap to implement Retry strategies
    - Extend OperationBase to get next retry interval using ErrorCode for
      failed operations
    - Copy ErrorCode during all operation Clone methods
    - Add integration tests to verify retry strategy behaviours against
      CouchbaseMock
    
    RESULT
    ------
    The error map has been extended to include retry strategies and failed
    KV operations can now use the ErrorMap to determine if they
    should implement a retry strategy. There are three retry strategies,
    constant, linear and exponential.
    
    Change-Id: I7558b5a733db2cd4cdb834a221429c067fbeca59
    Reviewed-on: http://review.couchbase.org/78970
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed May 15, 2017
Commits on Jun 23, 2017
  1. NCBC-1435: Log N1QL QueryRequest state

    Motivation
    ----------
    If DEBUG logging is enabled, output the state (params, statement, etc) of a
    N1QL request to the log.
    
    Modifications
    -------------
     - Call QueryRequest.ToString() and write to log if DEBUG logging is enabled.
     - Add unit tests for QueryRequest
    
    Results
    -------
    The state of the QueryRequest will be logged if DEBUG logging is enabled.
    
    Change-Id: I63c2791c91aa99a557155121542193d50c8878c6
    Reviewed-on: http://review.couchbase.org/78938
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris Jun 1, 2017
  2. NCBC-1382: Make KVErrorMap work with CouchbaseMock

    MOTIVATION
    ----------
    KV error map currently only works with CCP but should also work with
    HTTP streaming config too. The integration test that was added to work
    with cluster 5.0 and needs to also support CouchbaseMock.
    
    MODIFICATIONS
    -------------
    - Move the GetKVErrorMap operation inside IIOService implementations of
      EnableServerFeatures
    - Make the ErrorMap property internally available
    - Remove SetErrorMap
    - Update PooledIOService and MultiplexingIOService tests with ErrorMap
      changes
    
    RESULT
    ------
    The KV error map test now works with both HTTP Streaming and CCP
    providers and can load the KV error map from either a 5.0 cluster or
    Couchbase Mock.
    
    Change-Id: I00557515fc80eb53862061670b52f614389c8b66
    Reviewed-on: http://review.couchbase.org/77496
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    MikeGoldsmith committed Apr 28, 2017
  3. NCBC-1378: Make .NET client CouchbaseMock compatible

    MOTIVATION
    ----------
    CouchbaseMock (https://github.com/couchbase/couchbasemock) is a
    testing tool that can simulate a Couchbase server functionality.
    It would be useful for the .NET client to be compatible so we can
    utilize it as a means of testing new functionality.
    
    MODIFICATIONS
    -------------
    - Replace IPAddress with IPEndpoint in Config, VBucket and VBucket
      mappers
    - Add default buckets config paths that can be used if the server
      does not respond with one
    - Attempt verbose buckets config request if terse fails
    
    RESULT
    ------
    The .NET client is now compatible with CouchbaseMock and Integration
    tests that target the default bucket can be run against a locally
    running version of CouchbaseMock.
    
    Change-Id: I840268c7c7eea43fb895fa7f0aab5dc0b6583a93
    Reviewed-on: http://review.couchbase.org/77250
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    MikeGoldsmith committed Apr 24, 2017
Commits on Jun 22, 2017
  1. NCBC-1445: Add RBAC config section integration tests

    MOTIVATION
    ----------
    It should be possible to load a client configuration using a
    configuration section defined in an app or web config. This looks to
    already be working, but should have tests to ensure the feature
    continues to work.
    
    MODIFICATIONS
    -------------
    - add tests for both PasswordAuthenticator and ClassicAuthenticator to
      ensure it can authenticate when loaded using client config section
    
    RESULT
    ------
    There is now test coverage to ensure loading a configuration from
    app.config works as expected.
    
    Change-Id: I1f2371f5440f9c3541c75e5e0d28e15fd19a0dee
    Reviewed-on: http://review.couchbase.org/79715
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed with jeffrymorris Jun 20, 2017
  2. NCBC-1426: Fix missing Type.Initializer compiler issue in UnitTests

    Motivation
    ----------
    Fixes a unit test bug where in .NET Core the Type.Initializer is missing.
    
    Change-Id: Ia144c50f42190369e3cd6d212e06e01966abbc6c
    Reviewed-on: http://review.couchbase.org/78171
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris May 15, 2017
  3. NCBC-1442: Refactor PooledIOService for SharedConnectionPool

    Motivation
    ----------
    SharedConnectionPool requires that the connection be explicitly released
    back into the pool when the operation has completed IO so that the state
    of connection can be checked to see if it is still good or perhaps needs
    to be recreated if an IO or other error occurred. PooledIOConnection does
    the same, but uses the older Connection type - for async operations the
    connection itself will be released back into the pool when the call back
    is called (its completed its IO) implicitly. The behavior difference
    between explicitly or implicitly requires sub-classing or Type specific
    logic; this commit provides specialization over Type specific logic.
    
    Modifications
    -------------
     - Added SharedPooledIOService class that derives from PooledIOService
     - Made async methods on PooledIOService virtual
     - Override async methods in SharedPooledIOService
     - Make shared fields protected
     - Make IOServiceFactory default to SharedConnectionPool
    
    Results
    -------
    Both shared and non-shared pooled connections have the correct release
    behavior.
    
    Change-Id: I908d16c408a02750791a3495d08a2e97cde2a2a4
    Reviewed-on: http://review.couchbase.org/79327
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris Jun 9, 2017
  4. NCBC-1450: Fix Connection Pool unit test in Couchbase.Tests

    MOTIVATION
    ----------
    After a recent refactor for ConnectionPool, a factory function for a
    unit became invalid and longer compiles.
    
    MODIFICATIONS
    -------------
    - Change factory signature to use IConnectionPool
    
    RESULT
    ------
    The unit test successfully compiles and passes.
    
    Change-Id: I088fb98a455566e1dc6bb438734498c0fd5ecda9
    Reviewed-on: http://review.couchbase.org/79886
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed with jeffrymorris Jun 22, 2017
Commits on Jun 20, 2017
  1. NCBC-1447: Correct behavior of QueryRequest.Pretty(bool) method

    Motivation
    ----------
    Implementation of QueryRequest.Pretty(bool) is only sending pretty=true
    to the query engine, never pretty=false.  This makes it impossible to
    improve performance by disabling pretty print on Couchbase Server < 5.0.
    
    Modifications
    -------------
    Always send pretty=x to query engine if QueryRequest.Pretty(bool) is
    called.  If not called, it will continue to use the server-side default.
    
    Added unit and integration tests to test the behavior.
    
    Results
    -------
    Calling Pretty(false) now works as expected against Couchbase Server 4.5
    and 4.6.
    
    Change-Id: I42cfa655e50a78df018fbd156f29f2a8de2b53cf
    Reviewed-on: http://review.couchbase.org/79529
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    brantburnett committed with jeffrymorris Jun 14, 2017
  2. NCBC-1446: Add GetDocumentFromReplica implementation

    Motivation
    ----------
    A common use case after calling Get and receiving a failure is to call
    GetFromReplica.  Since there is no GetDocumentFromReplica implemenation,
    there is no easy way to fallback with the same return type from
    GetDocument.
    
    Modifications
    -------------
    Added GetDocumentFromReplica and GetDocumentFromReplicaAsync to IBucket,
    and CouchbaseBucket.  Throw NotSupportedException in MemcachedBucket.
    
    Results
    -------
    Documents can be read from replicas with an IDocumentResult<T> return
    type.
    
    Change-Id: I8cf9d18bb43e0b8a2f71a1969f5bab05a5ba5714
    Reviewed-on: http://review.couchbase.org/79644
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    brantburnett committed with jeffrymorris Jun 19, 2017
  3. NCBC-1440: CallbackFactory uses obsolete overload of IOperation.ReadA…

    …sync
    
    Motivation
    ----------
    Fixes a compiler warning that the SDK is using an obsolete overload of
    IOperation.ReadAsync.
    
    Modifications
    -------------
     - Replace ReasAsync(buffer, index, length) with ReadAsync(buffer)
     - Sort static fields signature
    
    Results
    -------
    No more compiler warnings.
    
    Change-Id: Ie600d0a1371d7cc17daca1f69215257cabe1d4e9
    Reviewed-on: http://review.couchbase.org/79218
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris Jun 8, 2017
  4. NCBC-1264: Fast-fail view queries for ephemeral buckets

    MOTIVATION
    ----------
    Ephemeral buckets are new for Couchbase Server 5+ but as they do not
    store documents to disk, they do not support view querying. The client
    should fast-fail view queries and not submit to the server.
    
    MODIFICATIONS
    -------------
    - Ensure bucket-type property is correctly assigned when retrieving a
      bucket config in both Http streaming and CCP providers
    - Fast-fail view queries if bucketType is ephemeral when submitting
      view queries in CouchbaseRequestExecutor
    - Add integration test to prove fast-fail
    
    RESULT
    ------
    View queries submitted to a ephemeral bucket fast-fail.
    
    Change-Id: I71dc5bc4adbfb4d6e65231d6e561f3fa1b303767
    Reviewed-on: http://review.couchbase.org/78132
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Build Bot <build@couchbase.com>
    MikeGoldsmith committed May 15, 2017
Commits on Jun 19, 2017
  1. NCBC-1439: Fix race condition with opaque mismatch

    Motivation
    ----------
    
    Fixes a race condition between the Send thread public override
    byte[] Send(byte[] request), Receive thread internal void ParseReceivedData(),
    .NET Task queue and SyncState pooling. Chances for this to occur are increasing
    with combination of high traffic, slow network and high utilization of Tasks
    (so Task may be queued for longer time).
    
    You can read the full synopsis here:
    #72
    
    Modifications
    -------------
    - Move the result assignment of SyncState from .NET thread pool into the
      receive thread.
    - Ensure that setting results on the state is synchronized to eliminate the
      race condition in MultiplexingIOConnection
    
    Results
    -------
    Resolves the race condition.
    
    Change-Id: I05241344b81d09e76be6475d594f73112f9f9425
    Reviewed-on: http://review.couchbase.org/79192
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jaekwon Park <jaekwon.park@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Svizel committed with jeffrymorris Jun 7, 2017
Commits on Jun 5, 2017
  1. NCBC-1437: Athentication failure at rebound phase in rem oving 2 node…

    …s test case
    
    Motivation
    ----------
    Fixes a bug where a connection would be created while disposing the IO
    layer. This causes an auth failure, if the node is no longer a part of the
    cluster.
    
    Modifications
    -------------
     - Remove creation of connection out of SharedConnectionPool.Release.
     - Remove error written to stderr
    
    Result
    ------
    Client should not throw auth exception after rebound phase of tests.
    
    Change-Id: I9e5e5c2c9ba772dec2ec2717e4eea16200472393
    Reviewed-on: http://review.couchbase.org/79069
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jaekwon Park <jaekwon.park@couchbase.com>
    jeffrymorris committed with jeffrymorris Jun 5, 2017
Commits on Jun 2, 2017
  1. NCBC-1371: add connection pooling for MUX connections

    Motivation
    ----------
    Adds pooling to MUX connections to support higher contention and give
    better overall performance.
    
    Modifications
    -------------
    Adds a new connection pool which distributes connections evenly across
    threads. Multiple threads can share a connection simultaneously. Updates
    factories and configuration so that the appropriate pool will be created
    when bootstrapping.
    
    Results
    -------
    The client will now use a pool of MUX connections.
    
    Change-Id: I795068020c616cbfe7e25c9e02d5773ff3331065
    Reviewed-on: http://review.couchbase.org/78804
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris May 30, 2017
Commits on Jun 1, 2017
  1. NCBC-1434: Don't use IOService to authenticate PlainTextMechanism

    MOTIVATION
    ----------
    As part of a recent refactor, SASL authentication flow has changed with
    authentication occurring before an IOService is created. This means that
    SASL implementations can not depend on an IOService, and should instead
    implement an internal way to authenticate a connection.
    
    MODIFICATIONS
    -------------
    - Remove IOService references from PlainTextMechanism and implement
      Execute method
    - Remove IOservice comment from CramMd5Mechanism
    - Update PlainTextMechanismTests to not use IOService in constructor
    
    RESULT
    ------
    The PlainTextMechanism no longer depends on an IOService to
    authenticate connections.
    
    Change-Id: I434b71b177498b5c143fe014efdee54de0b402c8
    Reviewed-on: http://review.couchbase.org/78919
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed Jun 1, 2017
Commits on May 25, 2017
  1. NCBC-1424: Add test coverage for ClusterHelper when using Authenticator

    MOTIVATION
    ----------
    The ClusterHelper should already work with the IAuthenticator pattern
    but is lacking unit and integration tests. Also, there are some unused
    properties held within ClusterHelper than can be removed.
    
    MODIFICATIONS
    -------------
    - Add unit and integration tests to ensure Authenticator is used during
      initialization when using ClusterHelper
    - Remove unused configuration and cluster controller constructor
      arguments
    
    RESULT
    ------
    Unit and integration tests ensure expected behaviour when using an
    Authenticator with ClusterHelper.
    
    Change-Id: I0980b572d900b1c67ddcc28f8b59c3aa58743e47
    Reviewed-on: http://review.couchbase.org/78185
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed May 16, 2017
  2. NCBC-1419: Update readme with details on unit and integration testing

    MOTIVATION
    ----------
    The README.md is the first thing developers see when viewing the GitHub
    repository and should be accurate. The README requires an update to
    describe how the test projects are organized and how to run them.
    
    MODIFICATIONS
    -------------
    - Update README.md to describe test projects and how to setup / run them
    
    RESULT
    ------
    The readme more accurately represents how the client's tests are
    organized and how to correctly run them.
    
    Change-Id: Idc129777090e448dfaf29b7576ba5dc568a5ae43
    Reviewed-on: http://review.couchbase.org/78186
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed May 16, 2017
  3. NCBC-1430: Enable automatic deployment of nuget package on tag

    MOTIVATION
    ----------
    AppVeyor support automatically deployment nuget packages to nuget.org
    which we can perform on repository tag. This is useful to improve
    automation of the client deployment.
    
    MODIFICATIONS
    -------------
    - Enable nuget package deployment to nuget.org on repository tag
    
    RESULT
    ------
    The nuget packages that are created during a git tag are automatically
    pushed to Nuget.org.
    
    Change-Id: I4caaa2d3c2867363a1bea92f1a83bfecfd63f0ac
    Reviewed-on: http://review.couchbase.org/78311
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed May 18, 2017
  4. NCBC-1432: Support Facets in FTS query responses

    MOTIVATION
    ----------
    Facets can be added to FTS queries for additional searching behaviour.
    The submission of facets in a query has already been committed, however,
    the parsing and processing of the results is missing. This commit adds
    support for the three available facets: term, numeric range and date
    range.
    
    MODIFICATIONS
    -------------
    - Update ISearchResult.Facets to be a dictionary<string, IFacetResult>
    - Update SearchDataMapper to parse and process facet results
    - Add FacetResultType, IFacetResult, DefaultFacetResult,
      TermFacetResult, Term, NumericRangeFacetResult NumericRange,
      DateRangeFacetResut and DateRange
    - Add unit and integration tests to verify behaviour
    
    RESULT
    ------
    Facet results are now supported and returned when included in an FTS
    query.
    
    Change-Id: Ie36150bfb51a515ff539e15d0f581962d29e6825
    Reviewed-on: http://review.couchbase.org/78488
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    MikeGoldsmith committed May 23, 2017
  5. NCBC-1429: NotSupportedException thrown when SSL enabled under high c…

    …oncurrency
    
    Motivation
    ----------
    Fixes a bug where a connection will be enqueued twice and then consumed on
    two or more threads causing the SslStream to throw a NotSupportedException
    because only a single thread can use the stream at one time.
    
    Modifications
    -------------
    Added a mutex lock to the queue and do a check to see if the connection
    has already been enqueued.
    
    Results
    -------
    Subsequent runs of the unit test indicate no exceptions are thrown.
    
    Change-Id: Iaf018325c4576853aa6314f83bead0ea01f68781
    Reviewed-on: http://review.couchbase.org/78340
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
    jeffrymorris committed with jeffrymorris May 19, 2017