Skip to content
Commits on Feb 5, 2016
  1. @jeffrymorris

    Remove test harness ref from sln file & upgrade to vs2015

    jeffrymorris committed
    Change-Id: Ib5e90139039b7aa46e276a9c042cba6a3fd6b5b5
    Reviewed-on: http://review.couchbase.org/59535
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
Commits on Jan 31, 2016
  1. @brantburnett @jeffrymorris

    NCBC-1074: Prevent MVC deadlock on async view queries

    brantburnett committed with jeffrymorris
    Motivation
    ----------
    When working within MVC actions, executing an asynchronous view query and
    then waiting for it to complete synchronously causes a deadlock.
    
    Modifications
    -------------
    CouchbaseRequestExecutor for aysnchronous view queries needed an
    additional call to ContinueOnAnyContext before an await.
    
    Also created an integration test which successfully detects this problem
    if it occurs in the future.
    
    Results
    -------
    MVC actions no longer deadlock in this scenario.
    
    Change-Id: I4e16062487e0b794dac413efc81e09341b96a809
    Reviewed-on: http://review.couchbase.org/59320
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jan 29, 2016
  1. @jeffrymorris

    Fix unit test that was failing

    jeffrymorris committed
    Change-Id: I415e074b99465b3f12ee4759e28610b4ac927a1c
    Reviewed-on: http://review.couchbase.org/58169
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jan 28, 2016
  1. @jeffrymorris

    Make NuGet.exe Executable

    Will Speak committed with jeffrymorris
    Updates the attributes on NuGet to make it executable.
    
    Change-Id: I83c3a585878e049bb9183dfce87b5af3b60db32c
    Reviewed-on: http://review.couchbase.org/58349
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    Add missing System.Runtime.Serialization reference

    jeffrymorris committed
    Change-Id: I9ea77734cb4f8b18fabbcfd37c691ec4f2f14ed3
    Reviewed-on: http://review.couchbase.org/59200
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-1076: Use default server configuration when there is no bucket c…

    Mark Vincze committed with jeffrymorris
    …onfig
    
    Motivation
    ----------
    
    If in the web.config <couchbase> section we only have a <servers> section,
    but no <buckets> section (because we don't want to statically configure
    any buckets), then when we try to open a bucket using its name, the client
    tries to use localhost:8091 instead of the server configured <servers>.
    See
    http://stackoverflow.com/questions/34183342/why-can-opening-a-couchbase-bucket-be-very-slow
    for more details.
    
    Modifications
    -------------
    Use parent configuration settings when creating a BucketConfiguration in
    ConfigProviderBase.
    
    Results
    -------
    When we get the configuration for a bucket, the server
    configuration is getting used even if there is no <buckets> section.
    
    Change-Id: I3e8f75e0a8b54c396806923b3e6cf8d376b954c3
    Reviewed-on: http://review.couchbase.org/58348
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. @jeffrymorris

    NCBC-1075: Add double lock check in connection pool acquire

    Dmitriy Storozhuk committed with jeffrymorris
    Motivation
    ----------
    Reduce contention while waiting for an available connection.
    
    Modifications
    -------------
    Added check to see if connection had been released while waiting on the
    mutex in ConnectionPool before creating a new connection.
    
    Result
    ------
    Less contention while acquiring a connection from the pool.
    
    Change-Id: If09a3dfd2446f2ec54a38e65f50e33ebab3ef2e6
    Reviewed-on: http://review.couchbase.org/58347
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jan 26, 2016
  1. @jeffrymorris

    NCBC-1072: Use DataMember over JSON.NET serialization attributes

    jeffrymorris committed
    Motivation
    ----------
    Rely on .NET DataMember attributes instead of JSON.NET attributes so that
    custom serializers can be used for N1QL requests.
    
    Modifications
    -------------
    Removed JsonProperty attributes from QueryResult and use DataMember attributes in their
    place.
    
    Results
    -------
    As long as the JSON parsing library supports
    System.Serialization.DataMember, then they will be compatible with the
    N1QL API.
    
    Change-Id: Ia7ff64e8ea74e4f33144aead974ee1a0cee1dc10
    Reviewed-on: http://review.couchbase.org/58990
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-1069: If a N1QL query times out the QueryRequest.Metrics is null

    jeffrymorris committed
    Motivation
    ----------
    The QueryRequest.Metrics property is null if the query times out on the
    client side. This makes the property non-null.
    
    Modifications
    -------------
    Create Metrics in ctor of QueryRequest.
    
    Results
    -------
    If you try to reference the QueryRequest.Metrics field, you do not have to
    check for nullability.
    
    Change-Id: I8e3683e8b42914b1716df4fe705dfe23037a8392
    Reviewed-on: http://review.couchbase.org/58954
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-1066: Support for async K/V method over TLS

    jeffrymorris committed
    Motivation
    ----------
    The async Key/Value methods for async operations were not implemented if
    UseSsl was enabled.
    
    Modifications
    -------------
    Added implementation for SSL/TLS to SslConnection for async memcached
    requests.
    
    Results
    -------
    The client now supports async operation while encrypting/decrypting
    communication between cluster and app servers.
    
    Change-Id: I4febf4e45a2a4472f32faac40a8f3f7528575061
    Reviewed-on: http://review.couchbase.org/58710
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. @jeffrymorris

    Add global test fixture file to project

    jeffrymorris committed
    Motivation
    ----------
    Improve test environment by making it easier to make changes to
    configurations.
    
    Modifications
    -------------
    Adds GlobalSetup class to test project to make it easier to change and
    test different configurations and centralize setup.
    
    Change-Id: I551c3b117d3bfdab733d2d377380a71381f8bf69
    Reviewed-on: http://review.couchbase.org/58699
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  5. @jeffrymorris

    Refactor TestConfiguration so that CouchbaseClientSections can be used

    jeffrymorris committed
    Motivation
    ----------
    Make it easier to switch configurations while testing.
    
    Modifications
    -------------
    Added overloads for getting the current configuration and/or a config
    section.
    
    Results
    -------
    Improved testing experiance.
    
    Change-Id: I4511f8cd116b7c64bb5402aa90b12df739811b13
    Reviewed-on: http://review.couchbase.org/58698
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Jan 25, 2016
  1. @jeffrymorris

    NCBC-1073: OOM exception when deserializing large N1QL result sets

    jeffrymorris committed
    Change-Id: I6a9a1e594252ead3015ac734d23f58849ae7d909
    Reviewed-on: http://review.couchbase.org/58992
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Jan 13, 2016
  1. @jeffrymorris

    NCBC-1058: QueryAsync blocks in ASP.NET when Result is called

    jeffrymorris committed
    Motivation
    ----------
    In certain synchronization contexts (e.g. ASP.NET), calling Result on Task
    returned by QueryAsync will cause a deadlock. This patch fixes the bug
    that caused this ensuring that Task can return to any context.
    
    Modifications
    -------------
    Added call to ConfigureAwait on Task awaited in Server.cs.
    
    Result
    ------
    The method no longer blocks waiting to resume on the syncronization
    context which initiated the Task.
    
    Change-Id: Iadadc8472428ab13d430bce04c46c1035c7e7725
    Reviewed-on: http://review.couchbase.org/58555
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  2. @jeffrymorris

    NCBC-1057: Don't fail fast when service is unavailable

    jeffrymorris committed
    Motivation
    ----------
    If the cluster does not contain a candidate node for a client request
    (data, index, query) instead of failing fast, the client should return
    back a failed response with a ServiceUnavailableException populating the
    IRequest.Exception field.
    
    Modifications
    -------------
    Modified the appropriate methods for each request type to return the
    ServiceUnavailableException rather than throw the exception.
    
    Result
    ------
    In certain situations such a node swap, returning the exception is preferable
    to throwing an exception since the failure likely temporary and the node will
    soon be back online.
    
    Change-Id: I2d39d4543cd109d93b97ef90b39ba666fe99c762
    Reviewed-on: http://review.couchbase.org/58504
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
  3. @jeffrymorris

    Add context_request_id tracing to N1QL queries.

    jeffrymorris committed
    Motivation
    ----------
    Adds a context id for tracing to each N1QL query request.
    
    Modifications
    -------------
    When a QueryRequest is created, a default ContextClientId will be created
    by incrementing an internal counter. Just before the request is sent over
    the wire, a "request context id" will be appended making a semi-unique
    composite ContextClientId. If the QueryRequest is reused, each reuse will
    result in a new "request context id" being generated.
    
    Result
    ------
    Each request/reply for a N1QL query will include a ContextClientId for
    tracing.
    
    Change-Id: I4c5fc29d7301ad44d599c31792223f7630433456
    Reviewed-on: http://review.couchbase.org/58425
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Jan 12, 2016
  1. @jeffrymorris

    NCBC-1054: Node unavailable exceptions after service restart

    jeffrymorris committed
    Motivation
    ----------
    After restarting a down service, the node should rejoin the cluster.
    
    Modifications
    -------------
    Add check to ensure connection wasn't null before diposing of it.
    
    Results
    -------
    SDK should continue to process to node that was previously down.
    
    Change-Id: Ib892f67d3c2f34897d56996dd653400b984ef51f
    Reviewed-on: http://review.couchbase.org/58361
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Dec 30, 2015
  1. @jeffrymorris

    NCBC-1047: log current SendTimeout if request times out at transport …

    jeffrymorris committed
    …layer
    
    Motivation
    ----------
    Previously the client would log the default value of the SendTimeout
    setting but not the actual value. This made debugging difficult.
    
    Modifications
    -------------
    The current SendTimeout value is now logged on SslConnection and
    Connection classes. The message was refactored and now is on the
    ExceptionUtil class.
    
    Results
    -------
    If a "send" request times out, then the client will log the SendTimeout
    value from the configuration.
    
    Change-Id: I00a63f2256365ecea4b3d33e85d699f0213f89a0
    Reviewed-on: http://review.couchbase.org/58153
    Reviewed-by: Brett Lawson <brett19@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-1049: Rename IOStrategy to IOService and other name refactoring

    jeffrymorris committed
    Motivation
    ----------
    Improve the naming of core IO namespaces and classes.
    
    Modifications
    -------------
    The namespace Couchbase.IO.Strategies was renamed to
    Couchbase.IO.Services. IOStrategy and related classes were renamed to
    IIOServices. All variable names and namespaces were renamed appropriately.
    
    Results
    -------
    The IO namespace interfaces and classes are now named in a manner
    consistant with their usage and behavior. This is important as some of
    the Types in this namespace may become public in future releases so that
    the SDK is more extensibility.
    
    Change-Id: Idb7d17f6f8f17b4379ce8a85b35cad994c5a5aa0
    Reviewed-on: http://review.couchbase.org/58144
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-1050: Make connection buffer configurable for pipelined/multiple…

    jeffrymorris committed
    …xed IO
    
    Motivation
    ----------
    Related to NCBC-1023 - makes the buffer configurable via
    PoolConfiguration.BufferSize.
    
    Modifications
    -------------
    Modify MultiplexedConnection so that the buffer size is allocated from the
    PoolConfiguration settings.
    
    Results
    -------
    Buffer size is configurable.
    
    Change-Id: Iaab9d4470179e36d250275739e0c453fac41ad6f
    Reviewed-on: http://review.couchbase.org/58133
    Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. @jeffrymorris

    Refactor trace levels for logging

    jeffrymorris committed
    Change-Id: Ib032557c7b5074644eb3c7a9110995a099c4dd6e
    Reviewed-on: http://review.couchbase.org/58129
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Brett Lawson <brett19@gmail.com>
  5. @jeffrymorris

    NCBC-1023: Implement IO multiplexing/pipelining

    jeffrymorris committed
    Motivation
    ----------
    The default IO layer uses connection pooling and a connection per thread
    pattern where a thread acquires a connection pool, uses it exclusively, and
    then releases it back into the pool when done. The multiplexed or
    "pipelined" approach allows multiple threads to use a connection and send
    requests while another dedicated thread handles the responses. The net
    result is higher performance using fewer connections and less overhead on
    the OS managing threads waiting for connections.
    
    Modification
    ------------
    This commit adds the MultipledConnection and MultiplexedIOStrategy classes
    which implemenet the pattern. A new IState interface has been added to
    help manage the state for an operation with async and sync
    implementations. There are also changes to the ConnectionPool
    class to better manage references and a new exception class for handling
    the case that the server has terminated the connection. IOperation has a
    new property for making it easier to track operations in async callbacks.
    
    Result
    ------
    The default transport layer is still DefaultIOStrategy, but by adding
    adding a ioService element to your App.COnfig and by overriding the type
    of the connection pool, you can switch to the multiplexed/pipelined
    strategy.
    
    Change-Id: Ia9fda9e34734b0c2f359f04862a628ebbe4ad055
    Reviewed-on: http://review.couchbase.org/55063
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
Commits on Dec 22, 2015
  1. @jeffrymorris

    NCBC-1046: Make MemcachedConfigContext use NodesAdapter for comparisons

    jeffrymorris committed
    Motivation
    ----------
    The MemcachedConfigContext was using the Nodes list as a comparison to see
    if the client needed a full reconfiguration; the NodesAdapter list is the
    authoritative list and some config changes may be missed.
    
    Modifications
    -------------
    Updated the MemcachedConfigContext so that it compares the NodesAdapter
    list rather than the Nodes list when a config update is detected.
    
    Result
    ------
    The client will use the most up-to-date cluster configuration.
    
    Change-Id: I799d723f6c81b6d4d456efdcbc43ea207ab1f10d
    Reviewed-on: http://review.couchbase.org/58029
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Dec 19, 2015
  1. @jeffrymorris

    NCBC-1045: Add support for pluggable IO service implementations

    jeffrymorris committed
    Motivation
    ----------
    Consumers may want to roll their own IO services based upon different
    performance profiles or use-cases; this allows the IO
    service and connection to be pluggable.
    
    Modifications
    -------------
    Adds a factory method to the ClientConfiguration and ClientConfigSection
    that allows the IO service/strategy to be injected.
    
    Results
    -------
    The IO Service and connection layer is now extensible/pluggable.
    
    Change-Id: Ic513b80ac874afe1e6cc061f4095874d0061aaf3
    Reviewed-on: http://review.couchbase.org/57968
    Reviewed-by: Brett Lawson <brett19@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Dec 18, 2015
  1. @jeffrymorris

    Misc test improvements

    jeffrymorris committed
    Motivation
    ----------
    Some test refactoring and new integration tests.
    
    Modifications
    -------------
    Adds a new project for integration tests. Also, adds a TestConfiguration class
    that allows the environment to be changed from done place via the app.config.
    
    Results
    -------
    Minor structural refactoring and improvements.
    
    Change-Id: Ie80161855773de0873cfd6416b3568ba5af3e2c1
    Reviewed-on: http://review.couchbase.org/57947
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    Add setup for all unit tests

    jeffrymorris committed
    Change-Id: I0d133647fe2a0500c88888ccbbfc60c9545235c5
    Reviewed-on: http://review.couchbase.org/57830
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Dec 17, 2015
  1. @jeffrymorris

    NCBC-1039: Part 2 - Force QueryClient to use HTTP Auth for N1QL queries

    jeffrymorris committed
    Motivation
    ----------
    Part 2 of a work around for MB-16964. Forces a N1QL query to use HTTP Auth
    headers as opposed to the "creds" array which is not working correctly for
    HTTP POST. This commit is specifically for non-async queries. Part 1 can
    be found here: 3e19dee.
    
    Modifications
    -------------
    Added Auth headers to HttpClient and use the bucket name and password as
    credentials.
    
    Result
    ------
    The QueryRequestAddCrendentials(..) method does not currenly work; this is
    a work around.
    
    Change-Id: I9bfc237066d8105249a6bbcd83b6a20e9af4d7d8
    Reviewed-on: http://review.couchbase.org/57820
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Dec 16, 2015
  1. @jeffrymorris

    NCBC-1042: Add support for max_parallelism to N1QL query request

    jeffrymorris committed
    Motivation
    ----------
    Specifies the maximum parallelism for the query on the remote server. There
    is also a server wide max_parallelism parameter which defaults to 1. If a
    request includes max_parallelism, it will be capped by the server
    max_parallelism. If a request does not include max_parallelism, the server
    wide max_parallelism will be used.
    
    Modifications
    -------------
    Add MaxServerParallelism method to QueryRequest; the "Server" in the name
    is to indicate the parallelism configuration is for server-side
    parallelism and not client-side parallalism related to async/await, TPL or
    multi-threading.
    
    Results
    -------
    Server-side parameter for max_parallelism is supported by the QueryRequest
    class.
    
    Change-Id: Ie84e3a3a39f27caad447b2991f301d93922c534b
    Reviewed-on: http://review.couchbase.org/57799
    Well-Formed: buildbot <build@couchbase.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Dec 15, 2015
  1. @jeffrymorris

    NCBC-1044: Make ServicePointManager changes non-global

    jeffrymorris committed
    Motivation
    ----------
    The ClientConfiguration class modifies the ServicePointManager defaults
    for a couple of parameters, namely DefaultConnectionLimit; this fixes
    changes to be applied non-globally to each ServicePoint instance.
    
    Modifications
    -------------
    Move references to ServicePointManager from ClientConfiguration. Add
    ConfigureServicePoint method to UriExtensions which applies the setting to
    the ServicePoint instance. Modify CouchbaseCOnfigContext to use call
    COnfigureServicePoint for each Uri created.
    
    Results
    -------
    ServicePoint tuning now only applies to URI's used by the SDK.
    
    Change-Id: I5520b269e4b8f7b0e24788ecf95e878f39efaff4
    Reviewed-on: http://review.couchbase.org/57672
    Well-Formed: buildbot <build@couchbase.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Commits on Dec 8, 2015
  1. @brantburnett @jeffrymorris

    Provide access to cluster from IBucket

    brantburnett committed with jeffrymorris
    Motivation
    ----------
    Some activites on a bucket might need to access information about the
    cluster, such as the number of nodes, cluster status, etc.  Currently,
    this information is unavailable from IBucket.
    
    This is based on my own experience creating a set of reactive extensions
    for Couchbase:
    brantburnett/Rx-Couchbase@99a1480#diff-d29a87c81f7ee323271660849b15521bR32
    In this case it would be helpful to be able to adjust the degrees of
    parallelism based on the total number of nodes in the cluster.
    
    This is also based on a conversaion on the forums:
    https://forums.couchbase.com/t/cluster-info-from-bucket/5476
    In this case, the user was forced to use server info from configuration
    only.  They didn't have access to all the servers in the cluster, only the
    ones that were configured in advance.
    
    Modifications
    -------------
    Added a new Cluster property to IBucket to reference the cluster the
    bucket was created from.  To access this information easily, the internal
    IClusterController interface was modified to include an ICluster property.
    
    Modified the constructors for Cluster to automatically link the
    ClusterController to the Cluster when the cluster is created, except in
    some unit testing scenarios when the ClusterController is created first.
    
    Also updated ClusterHelper to use the constructor which does this linking
    automatically.
    
    Created a test that confirms that the link is in place all the way from
    Cluster through to the IBucket implementation.
    
    Results
    -------
    Both the CouchbaseBucket and MemcachedBucket implementations now provide
    easy access to their ICluster.
    
    Change-Id: I3e29eaae2a67f535bd86b2352dc268b756c9ad29
    Reviewed-on: http://review.couchbase.org/57600
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-1031: durability performance regression fix

    jeffrymorris committed
    Motivation
    ----------
    Invalid logic causes all observe operations to execute minimally for the
    ObserveTimeout value (500ms).
    
    Modifications
    -------------
    Changed logic so that the not mutated state is correctly handled, thus
    returning the correct durability state.
    
    Results
    -------
    Observe will correctly return durability succeeded(if it has) and not attempt
    another try after the ObserveTimeout has exceeded.
    
    Change-Id: Ie934fa10d34241299a13c8c3b436d68195233626
    Reviewed-on: http://review.couchbase.org/57131
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  3. @jeffrymorris

    NCBC-1038: If no primary index exists and adhoc is false client will …

    jeffrymorris committed
    …loop until timeout
    
    Change-Id: I1ba830f94e087167ad4f7d4ae3494b77739b2d66
    Reviewed-on: http://review.couchbase.org/57430
    Reviewed-by: Simon Baslé <simon@couchbase.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  4. @jeffrymorris

    NCBC-1039: Force QueryClient to use HTTP Auth for N1QL queries

    jeffrymorris committed
    Motivation
    ----------
    Work around for MB-16964. Forces a N1QL query to use HTTP Auth headers as
    opposed to the "creds" array which is not working correctly for HTTP POST.
    
    Modifications
    -------------
    Added Auth headers to HttpClient and use the bucket name and password as
    credentials.
    
    Result
    ------
    The QueryRequestAddCrendentials(..) method does not currenly work; this is
    a work around.
    
    Change-Id: I0ae3a2eb9d552ee396322be9bf6826b61441ba0f
    Reviewed-on: http://review.couchbase.org/57474
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Commits on Nov 13, 2015
  1. @brantburnett @jeffrymorris

    Support for more deserialization controls via ITypeSerializers

    brantburnett committed with jeffrymorris
    Motivation
    ----------
    The current ITypeSerializer implementation works under the assumption that
    all serialization/deserialization requests should have the same behavior.
    Any client library which implements a custom ITypeSerializer overrides
    this behavior for all requests to Couchbase.
    
    However, there are instances where a specific request may require custom
    options.  The particular example addressed here is change tracking in the
    Linq2Couchbase library.  It needs to control the object creation process
    for some deserialization requests in order to create change tracking
    proxies.
    
    Additionally, we need a method for custom ITypeSerializer implementations
    to provide member name resolution information to consumers.  This will
    allow Linq2Couchbase to determine the correct attribute names to use when
    building N1QL queries.  Currently, it is forced to assume that the
    Newtonsoft.Json behavior is in use.
    
    Finally, there is currently no method to override the deserialization
    process for N1QL queries on a per-request basis.
    
    Modifications
    -------------
    Created a new interface which extends ITypeSerializer named
    IExtendedTypeSerializer.
    
    Added GetMemberName method to IExtendedTypeSerializer, which provides
    member name resolution information to consumers.
    
    Added DeserializationOptions to IExtendedTypeSerializer, which allows
    consumers to set the options they'd like.  Currently, this object supports
    only one option, CustomTypeCreator, which allows the consumer to override
    the type creation process on a type-by-type basis.
    
    Also provided a SupportedDeserializationOptions object.  This allows the
    IExtendedTypeSerializer to define which options it does or does not
    support.
    
    Updated the DefaultSerializer to support all of the new interfaces,
    methods, and options provided.
    
    Additionally, created a new interface IQueryRequestWithMapper, inherited
    form IQueryRequest, which adds a DataMapper to IQueryRequest.  Added this
    interface to the default QueryRequest implentation.  This allows the data
    mapper used for N1QL queries can be customized on a per-request basis.
    
    Results
    -------
    For users using the DefaultSerializer based on Newtonsoft.Json, they will
    immediately have access to the new features on IExtendedTypeSerializer.
    This includes a method to resolve member names, and the ability to
    override the type creation process.  This will allow Linq2Couchbase to
    transparently implement change tracking proxies.
    
    For projects using a custom ITypeSerializer implementation, consumers such
    as Linq2Couchbase can detect support for advanced features by testing for
    the IExtendedTypeSerializer interface.  If present, they can then test for
    specific features via the SupportedDeserializationOptions property.
    
    Backwards compatibility is fully maintained by these changes.
    Additionally, the use of SupportedDeserializationOptions will allow the
    addition of more deserialization options in the future without creating
    backwards compatibility issues.
    
    Change-Id: I60db3a6a93d787d9e5e48ed1984e7b31566d348e
    Reviewed-on: http://review.couchbase.org/56960
    Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  2. @jeffrymorris

    NCBC-1030: Query requests are sent to rebalanced out query node

    jeffrymorris committed
    Motivation
    ----------
    If a query node is swapped out and the bootstrap node is a different node
    and the query node is also not a data node, the cluster map updates will
    not be recieved by the client, thus the client will continue to use an old
    config. This patch fixes that bug by forcing a config update check if a
    certain exception is thrown.
    
    Modifications
    -------------
    Add the UpdateConfig method to the IRequestExecutor interface and an
    implementation in the base class. Add additional logic to Server class so
    that references do not live on after being disposed because of a leaky
    timer.
    
    Result
    ------
    If a non-data node recieves a remote error (the node is no longer part of
    the cluster), it will force a config check and update the cluster map if
    it's different from the current config.
    
    Change-Id: Icdad5140f8111fbc34378972e6834aebed9346a1
    Reviewed-on: http://review.couchbase.org/56714
    Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
    Reviewed-by: Simon Baslé <simon@couchbase.com>
Something went wrong with that request. Please try again.