Revision tags: 3.2.5, 3.2.5-DI, 3.2.4, 3.2.3, 3.2.1, 3.2.0, 3.1.7, 3.1.5, 2.7.25, 3.1.4, 2.7.24, 3.1.3 |
|
#
1a28374e |
| 04-Feb-2021 |
Brant Burnett <bburnett@centeredgesoftware.com> |
NCBC-2813: Cleanup IOperation and OperationBase code Motivation ---------- Reduce DLL size, improve performance, and reduce complexity (and therefore the risk of future bugs).
NCBC-2813: Cleanup IOperation and OperationBase code Motivation ---------- Reduce DLL size, improve performance, and reduce complexity (and therefore the risk of future bugs). Modifications ------------- Remove members from IOperation and IOperation<T> which are not used via the interface. Also make properties readonly which are never set via the interface. Organize members better, add XML doc comments, and enable nullable reference types. Remove unused members from OperationBase, and adjust the visibility of members to be the minimum required. Remove the virtual keyword from members that are never overridden, and remove no-op overrides from descendants. Organize the members and add XML doc comments. Since IRequest.Idempotent and IOperation.IsReadOnly are basically the same thing, remove the implementation of Idempotent and forward the requests to IsReadOnly. This also drops a backing field. Drop backing fields from ClientContextId and Statement, which are never set on operations. Drop IsReplicaRead in favor of making ReplicaIdx nullable. Drop GetResultWithValue returning IOperationResult<T> since every call site was only reading .Content, which is available directly from GetValue(). This allowed removing several other supporting methods that were effectively unused, such as GetMessage() and its supporting methods. Drop ErrorMap/ErrorCode handling from reading the operation header, as this was unused. Renamed IOperation.GetConfig to ReadConfig to be more clear. Results ------- - Smaller DLL due to removed unused code - There should be a marginal performance gain because OperationBase is smaller, reducing memory allocations and cost to zero memory - There should also be a marginal performance gain due to elimating a few virtual method calls - The code is much cleaner and easier to understand, which should make further work in this area easier and less likely to introduce bugs Change-Id: Ib5836078440e26ba1417efe4b46c95e9b04d1df9 Reviewed-on: http://review.couchbase.org/c/couchbase-net-client/+/145154 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Build Bot <build@couchbase.com>
show more ...
|
Revision tags: 3.1.2, 2.7.23, 3.1.1 |
|
#
63f3c266 |
| 06-Dec-2020 |
Brant Burnett <bburnett@centeredgesoftware.com> |
NCBC-2736: Optimize key/value operation flag handling Motivation ---------- Improve the performance of key/value operations. Modifications ------------- Drop BitUtil
NCBC-2736: Optimize key/value operation flag handling Motivation ---------- Improve the performance of key/value operations. Modifications ------------- Drop BitUtils, which was handling one bit at a time, in favor of grouped bit shifting. Move the read and write logic to shared methods in the Flags structure. Fix incorrect read logic for Compression, which was reading bits 4-6 instead of 5-7. Drop duplicate storage of DataFormat and Compression enums directly on the operation and within the Flags structure, instead storing them only in the Flags structure. Getters are left in place as property getters which should be inlined for speed. Results ------- Reduced heap size of OperationBase. Approximately 50% performance improvement for ReadExtras, gains should be similar on WriteExtras. Since both of these are called on most key/value operations, gains should be significant. BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042 Intel Core i7-9750H CPU 2.60GHz, 1 CPU, 12 logical and 6 physical cores .NET Core SDK=5.0.100 [Host] : .NET Core 3.1.9 (CoreCLR 4.700.20.47201, CoreFX 4.700.20.47203), X64 RyuJIT DefaultJob : .NET Core 3.1.9 (CoreCLR 4.700.20.47201, CoreFX 4.700.20.47203), X64 RyuJIT | Method | Mean | Error | StdDev | Ratio | Rank | |-------- |----------:|----------:|----------:|------:|-----:| | Current | 18.228 ns | 0.0676 ns | 0.0564 ns | 1.00 | 2 | | New | 8.501 ns | 0.0287 ns | 0.0224 ns | 0.47 | 1 | Change-Id: I2745337a37cc143ca990c896f67788ecaf71b6ef Reviewed-on: http://review.couchbase.org/c/couchbase-net-client/+/141557 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: <richard.ponton@couchbase.com>
show more ...
|
Revision tags: 3.1.0, 2.7.22, 3.0.7 |
|
#
9670b373 |
| 24-Oct-2020 |
Brant Burnett <bburnett@centeredgesoftware.com> |
NCBC-2689: Create pluggable compression infrastructure Motivation ---------- Allow users to choose their own Snappy implementation in order to enable operation compression and de
NCBC-2689: Create pluggable compression infrastructure Motivation ---------- Allow users to choose their own Snappy implementation in order to enable operation compression and decompression. Modifications ------------- Add options for compression to ClusterOptions, along with support for parsing those options from connection strings. This required updating boolean logic to also accept "on" and "off" as connection string values to match the RFC. Implement OperationCompressor to apply standard rules around when outgoing requests should be compressed. This class forwards to the registered ICompressionAlgorithm, which is NullCompressionAlgorithm by default. Add Snappy to HELO if compression is enabled **and** a compression algorithm other than NullCompressionAlgorithm has been registered. Inject the IOperationCompressor into OperationBase using the OperationConfigurator. Attempt to apply compression to the body after the body is written to the OperationBuilder if the particular operation has the SupportsRequestCompression flag **and** Snappy was negotiated successfully with the server. Decompress the operation body received from the server based on the DataType flags returned in the operation header. This happens in two places, used by different operation types, OperationBase.ExtractBody or OperationBase<T>.GetValue. Results ------- Behavior is unchanged without specifically injecting a compression algorithm into ClusterOptions. If an algorithm is injected, Snappy will be negotiated with the server. This may also be disabled, even if an algorithm is injected, via the connection string (but it defaults to enabled, per RFC). If successfully negotiated, any response from the server which is received in compressed form will be decompressed prior to processing. If successfully negogiated, Add, Append, Prepend, Replace, and Set mutation bodies will be compressed when sent to the server (per RFC). More operations can be easily supported by overriding SupportsRequestCompression on the operation. Note: The CompressionAlgorithm enumeration is purely for future-proofing in the event Couchbase Server adds another compression algorithm in the future. Change-Id: I2eb9541ddc51111c62559e54484866b9b780f945 Reviewed-on: http://review.couchbase.org/c/couchbase-net-client/+/139790 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 3.0.5, 2.7.20, 3.0.4, 2.7.19, 3.0.3, 3.0.2, 3.0.1, 2.7.18, 2.7.17 |
|
#
b1fb0f06 |
| 23-Apr-2020 |
RiPont <richard.ponton@couchbase.com> |
NCBC-2468: System.ArgumentException: ReadResult does not contain valid MutationToken Motivation ---------- This patch fixes a bug where UpsertAsync is not properly populating the Mut
NCBC-2468: System.ArgumentException: ReadResult does not contain valid MutationToken Motivation ---------- This patch fixes a bug where UpsertAsync is not properly populating the MutationToken. Modifications ------------- - Include BucketName and Key in MutationResultBase constructor as required parameters. - Include assertion of BucketName in mock of CouchbaseBucket.SendAsync. Result ------ QueryOptions.ConsistentWith(state) is now usable. Change-Id: Ib07388629ef18eb282a8fef0c5a869704d153580 Reviewed-on: http://review.couchbase.org/c/couchbase-net-client/+/126545 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
#
55520e40 |
| 01-Apr-2020 |
Brett Lawson <brett19@gmail.com> |
NCBC-2454: Replicas should be tracked separate from vbuckets. Motivation ---------- The existing implementation utilized the vbucket index to hold the replica index while the ope
NCBC-2454: Replicas should be tracked separate from vbuckets. Motivation ---------- The existing implementation utilized the vbucket index to hold the replica index while the operation is being transitioned from the high level operation creation down to operation dispatch. This caused issues when operations were retried as the replica index was lost and then miss-used for a replica index lookup when it was in fact a vbucket index at that point. Changes ------- Implemented a new parameter on the operation which tracks the replica index target of an operation and modified all usages of VbucketId relating to replica indexes to use it. Change-Id: I5bf9d0789f3ed9e6dc202da44d9a81a90b2d401a Reviewed-on: http://review.couchbase.org/c/couchbase-net-client/+/124780 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Matt Ingenthron <ingenthr@gmail.com>
show more ...
|
Revision tags: 3.0.0, 2.7.16, 3.0.0-beta4, 3.0.0-beta3, 2.7.14, 3.0.0-beta2 |
|
#
e308481b |
| 07-Nov-2019 |
Jeff Morris <jeffry.morris@couchbase.com> |
NCBC-2174: Port Error Map from 2.X and integrate into 3.x Motivation ---------- Removes legacy namespace and enables operations to use the ErrorMap after processing. Mod
NCBC-2174: Port Error Map from 2.X and integrate into 3.x Motivation ---------- Removes legacy namespace and enables operations to use the ErrorMap after processing. Modifications ------------- - Move Couchbase.Core.IO.Operations.Legacy to Couchbase.Core.IO.Operations - Hook up ErrorMap in operation completed callback - Write unit tests Result ------ ErrorMap is now used to add additional error information to Exceptions if thrown. Change-Id: I93a9d741613a16a7d1c202392e2e3e4b84f4a659 Reviewed-on: http://review.couchbase.org/117475 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: David Nault <david.nault@couchbase.com>
show more ...
|
Revision tags: 3.0.0-beta1, 2.7.12, 2.7.11, 2.7.10, 2.7.9, 2.7.8, 3.0.0-alpha4, 3.0.0-alpha3, 2.7.7 |
|
#
d938dda3 |
| 08-Apr-2019 |
Brant Burnett <bburnett@centeredgesoftware.com> |
NCBC-1900: Write extras to OperationBuilder Motivation ---------- Improve efficiency of extras generation by reducing heap allocations. Modifications ------------- R
NCBC-1900: Write extras to OperationBuilder Motivation ---------- Improve efficiency of extras generation by reducing heap allocations. Modifications ------------- Replace CreateExtras with WriteExtras, which accepts an OperationBuilder. Use stack allocated spans for building the block to write to the stream instead of heap allocated byte arrays. Results ------- Reduced heap allocations. There is still an extra bitblit taking place to the shared memory pool. This will be addressed on .NET Core 2.1 with a future improvement to RecyclableMemoryStream. Change-Id: I931bc07b2630984e376e55a25fcda0111917b4c8 Reviewed-on: http://review.couchbase.org/107480 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
show more ...
|
#
21843b11 |
| 07-Apr-2019 |
Brant Burnett <bburnett@centeredgesoftware.com> |
NCBC-1909: Consolidate OperationBase.SendAsync Motivation ---------- Considate the SendAsync behavior under a single implementation in OperationBase, implementing per-operation b
NCBC-1909: Consolidate OperationBase.SendAsync Motivation ---------- Considate the SendAsync behavior under a single implementation in OperationBase, implementing per-operation behavioral differences using other methods. Modifications ------------- For all non-subdoc operations, removed SendAsync. Added overrides to CreateXXX where required to return empty arrays wherever that operation was skipping that segment. Removed the unnecessary CreateHeader(...) overload that accepted byte arrays for each segment, this is now handled solely by OperationBuilder. Added BeginSend virtual method to call before writing begins to allow methods to set values in advance, rather than relying on setting them during CreateExtras. Results ------- Cleaner and more understandable code, and the groundwork is now laid for gradually replacing `byte[] CreateXXX` methods with `void WriteXXX(OperationBuilder)` methods which will be more efficient. Change-Id: I9ff8394df98a2c24602ba258dbda3a2d38c86c53 Reviewed-on: http://review.couchbase.org/107394 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
show more ...
|
Revision tags: 2.7.6 |
|
#
26d5de2d |
| 23-Mar-2019 |
Brant Burnett <bburnett@centeredgesoftware.com> |
NCBC-1886: Use Array.Empty for empty byte arrays Motivation ---------- Empty byte arrays are effectively immutable objects, so creating a new one on the heap every time is unnece
NCBC-1886: Use Array.Empty for empty byte arrays Motivation ---------- Empty byte arrays are effectively immutable objects, so creating a new one on the heap every time is unnecessary. Efficiency can be improved by using a singleton. Modifications ------------- Replace all instances of `new byte[0]` with `Array.Empty<byte>()` to use the system-wide empty array singlton. Results ------- A significant reduction in unnecessary heap allocations, especially when writing operations. Change-Id: I2903d46cffbd238f126238edb101dbd4f3f25c95 Reviewed-on: http://review.couchbase.org/106668 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 3.0.0-alpha2, 3.0.0-alpha1 |
|
#
43cf091c |
| 08-Mar-2019 |
Mike Goldsmith <goldsmith.mike@gmail.com> |
NCBC-1857: Move SDK v3 source into Gerrit MOTIVATION ---------- The .NET SDK v3 development was taking place in another repository. This should be moved to the main repository.
NCBC-1857: Move SDK v3 source into Gerrit MOTIVATION ---------- The .NET SDK v3 development was taking place in another repository. This should be moved to the main repository. MODIFICATIONS ------------- - migrate .NET SDK v3 to gerrit RESULT ------ The SDK v3 source code for .NET is now on Gerrit. Change-Id: Id8eaa49dba3d10fd9069f6377160f4ebec8586e2 Reviewed-on: http://review.couchbase.org/105924 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 2.7.5, 2.7.3, 2.7.2, 2.7.1, 2.7.4, 2.7.0, 2.6.2, 2.6.1, 2.6.0, 2.5.12, 2.5.11, 2.5.10, 2.6.0-beta, 2.5.9, 2.5.8, 2.5.7, 2.5.6, 2.6.0-dp1, 2.5.5, 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5.0, 2.4.8, 2.4.7, 2.4.6 |
|
#
79298113 |
| 15-May-2017 |
Mike Goldsmith <goldsmith.mike@gmail.com> |
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. T
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>
show more ...
|
Revision tags: 2.4.5 |
|
#
19cd1979 |
| 02-May-2017 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-1410: Ensure bucketName is cloned for retries Motivation ---------- If the BucketName is null for an operation when it fails and is retried, a NullReferenceException will be
NCBC-1410: Ensure bucketName is cloned for retries Motivation ---------- If the BucketName is null for an operation when it fails and is retried, a NullReferenceException will be caught and handled. This patch will ensure that the bucektName is not null. Modifications ------------- Update all operations that are retriable so that the Clone() method clones the bucketName as well. Results ------- Retriable operations will have a bucketName so that the response can be mapped to the appropriate bucket if a config refresh is required. Change-Id: I317c348af8edf3a88b46670dea6b6acbb9532538 Reviewed-on: http://review.couchbase.org/77629 Reviewed-by: Jaekwon Park <jaekwon.park@couchbase.com> Tested-by: Jaekwon Park <jaekwon.park@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
show more ...
|
Revision tags: 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.11, 2.3.10, 2.3.9, core-dp1, 2.3.8 |
|
#
7eff8cd8 |
| 12-Aug-2016 |
Mike Goldsmith <goldsmith.mike@gmail.com> |
NCBC-1141: When Id is not present in doc fail-fast MOTIVATION ---------- Whenever mn insert, replace, append or prepend command is executed without a key property an exception is
NCBC-1141: When Id is not present in doc fail-fast MOTIVATION ---------- Whenever mn insert, replace, append or prepend command is executed without a key property an exception is thrown during serialization. It would be better to fail-fast if the key was null or empty. Whenever an operation that requires a key is executed without a valid key an exception is thrown during serialization. It would be better to fail-fast and throw an exception when the operation is created with an invalid key. MODIFICATIONS ------------- Add new KeyException that sets the message to "Key cannot be null or empty.". Thorw KeyException during construction if key is null or empty for: - Get, GetL, GetQ, GetQ and GetT - Hello - Add, Append, Decrement, Delete, Prepend, Replace and Set - Observe - ReplicaRead - Touch - Unlock - All Subdocument operations Added tests to prove a null or empty key throws for each operation type correctly. Also added local.config to .gitignore so we can have local appSettings that don't need to be added to source control. RESULT ------ If an insert command is executed without a valid key the operation now fails quickley before trying to serialize the operation. Change-Id: I8a155c6909204ac60059b1c4ce3becddd3153510 Reviewed-on: http://review.couchbase.org/66725 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 2.3.5, 2.3.3, 2.3.1, 2.3.0, 2.3.6 |
|
#
d3892232 |
| 15-Apr-2016 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-1061: Improve vBucket Retry Logic Motivation ---------- Make the .NET Not My VBucket (NMV) behavior consistent with others SDK's per RFC:0005_vbucket_retries. Modif
NCBC-1061: Improve vBucket Retry Logic Motivation ---------- Make the .NET Not My VBucket (NMV) behavior consistent with others SDK's per RFC:0005_vbucket_retries. Modifications ------------- Make overload for GetServer take a cluster map rev # which is that latest revision that the operation was executed against that uses the VBucket forward map if it's available on a retry, otherwise uses the regular VBucket Map. Change the rev# on various classes to be a unsigned integer since a rev # should always be a positive integer. Update various code paths so that the rev# is included with each operation retry. Results ------- Client will use the VBucket Forward Map if it's available if a NMV is returned by the server, but only if the rev # hasn't changed, otherwise it will use the regular VBucket Map. Change-Id: I47d1806092ecce0ab59cf07ed614380d7c8bba6a Reviewed-on: http://review.couchbase.org/62881 Reviewed-by: Simon Baslé <simon@couchbase.com> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 2.2.7, 2.2.8, 2.2.6, 1.3.13, 2.2.4, 2.2.5, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.2.0-dp1 |
|
#
fecbf950 |
| 11-Aug-2015 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-977: Add support for enhanced durability Motivation ---------- Couchbase Server 4.0 provides support for enhanced durability using a sequence number that represents the node
NCBC-977: Add support for enhanced durability Motivation ---------- Couchbase Server 4.0 provides support for enhanced durability using a sequence number that represents the nodes current replication and persistence state. By comparing a Mutation token againsts the nodes state we can more accurately determine concurrent mutations and handle fail-over scenarios more gracefully. The older CAS based observe is still available and is the default; the new method requires that BucketConfiguration.UseEnhancedDurability be set to true, a CB 4.0 cluster and replication be configured on the cluster up to the durability requested. Modifications ------------- Two new commands are now supported: hello and observe_seqno; Hello determines what the cluster can support feature wise and enables mutation tokens and observe-seqno returns the current state of the cluster. A new configuration property was added (BucketConfiguration.UseEnhancedDurability) which enables the mutation token support. An additional observe class was added which uses the mutation token as well. Finally, the CouchbaseRequestExecutor was modified to toggle between CAS and Mutation Token based observe. Results ------- On Couchbase Server 4.0 clusters, if replication has been enabled and UseEnhancedDurability is enabled, observe requests will use mutation tokens instead of CAS for durability checks. Change-Id: I2131b193888e88a4d429c18dad5a480fd1747829 Reviewed-on: http://review.couchbase.org/54337 Reviewed-by: Simon Baslé <simon@couchbase.com> Tested-by: Simon Baslé <simon@couchbase.com>
show more ...
|
Revision tags: 2.1.4 |
|
#
92a51139 |
| 17-Jul-2015 |
Vojta Jakubec <vojta.jakubec@concur.com> |
NCBC-955: Add option to affect operation flags with value fomatting Motivation ---------- The original implementation of ITypeTranscoder does not allow full customization of enco
NCBC-955: Add option to affect operation flags with value fomatting Motivation ---------- The original implementation of ITypeTranscoder does not allow full customization of encoded values. It still binds the encoding by hard wired formatting flags based on the generic type of operation. The new implementation allows for full encoding customization like unwrapping of values passed in as object generic type. Modifications ------------- Added GetFormat to ITypeTranscoder and implementation to DefaultTranscoder. Removed GetFormat method from OperationBase and instead use the ITypeTranscoder's GetFormat method. Result ------ Now supports customization of encoded values for custom ITypeTranscoder implementations. Change-Id: I1590fc995223a250063818fa68ed460bfe97e68a Reviewed-on: http://review.couchbase.org/53438 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 2.1.3, 2.1.2, 2.1.1, 2.1.0 |
|
#
8108e5a6 |
| 18-Apr-2015 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-676: Make JSON Serializer "Pluggable" Motivation ---------- The Couchbase .NET SDK uses JSON.NET as the default serializer and it previously was tightly coupled to the inter
NCBC-676: Make JSON Serializer "Pluggable" Motivation ---------- The Couchbase .NET SDK uses JSON.NET as the default serializer and it previously was tightly coupled to the internals of the client. This commit makes it possible to create and plug-in custom serializers using whatever serialization dependency you chose to use. Modifications ------------- A new interface, ITypeSerializer, was added that defines the methods which need to be implemented by your custom serializer. A default serializer that uses JSON.NET was added; it is aptly named the DefaultSerializer. A SerializerFactory was added that returns Func<ITypeSerializer> objects; the configuration has added support for creating ITypeSerializers from a <serializer type="" name=""/> element in the App.Config. Finally, the constructors of all operations were refactored so that they used the value returned by the Func<ITypeSerializer>. Results ------- Now, if the DefaultSerializer based off JSON.NET does not suit your fancy, you can create a custom one (ServiceStack.Text, Jil, etc) and inject it into the client. Change-Id: If765552821cbea6b19e14f5e61032a7ff38f1434 Conflicts: Src/Couchbase/CouchbaseBucket.cs Src/Couchbase/MemcachedBucket.cs Change-Id: I8cfcd71e45ab8e575c21971380b71246ecd81823 Reviewed-on: http://review.couchbase.org/50209 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 1.3.12 |
|
#
0ba3f4aa |
| 31-Mar-2015 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-842: Add overloads for non-generic SendWithRetry and SendWithRetryAsync Motivation ---------- Certain operations, Touch for example, do not have a body, thus the generic Typ
NCBC-842: Add overloads for non-generic SendWithRetry and SendWithRetryAsync Motivation ---------- Certain operations, Touch for example, do not have a body, thus the generic Type parameters are meaningless. In the past, a placeholder Type was used. In this commit we are changing the requirement for place holder types by providing non-generic operations and execution flows. Modifications ------------- OperationBase<T> was refactored into two classes: a non-generic and a generic version. Operations with no body inherit from the non generic one. The Clone method was changed to be non-generic. The IRequestExecutor interface and implementations, the IServer and it's implmentation, and IIOstrategy were updated to support the non-generic operations as well. Result ------ Placeholder types no longer need to be used for non-generic operations. Specialization and cohesion have been improved. Change-Id: I12de8cb3e4cc7e79767175dfdea08823ca19fbc0 Conflicts: Src/Couchbase/Core/Buckets/IRequestExecuter.cs Change-Id: I33ac14d83a74c3540a3ef918e0658f18617f5604 Reviewed-on: http://review.couchbase.org/49142 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 2.0.3 |
|
#
fb7031b1 |
| 18-Feb-2015 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-532: Provide support for async/await for K/V Motivation ---------- This commit provides support for async/await for all K/V operations, however future commits will provide m
NCBC-532: Provide support for async/await for K/V Motivation ---------- This commit provides support for async/await for all K/V operations, however future commits will provide most of the implementation for the various overloads. Importantly, it changes the IO model to support non-blocking IO for all methods which use the await keyword. Modifications ------------- The IServer, IIOstrategy, and IConnection have new method signatures for supporting asynchronous operations. All return Task<IOperationResult> methods that can be awaited for there results. IOperation also has a new callback func that the IO layer will use to complete an asyncronous operation. The CouchbaseBucket and MemcachedBucket were refactored to enhance maintability by moving all operation send logic to a new classes that implement a new interface called IRequestExecuter. IBucket was also modifed and signatures for async versions of all K/V methods were added; note that in most cases the implementation for these methods will be provided in subsequent commits. Result ------ The client now has the infrastructure changes in place to support awaiting K/V operations asynchrounously using the familiar await and async keywords that were introduced in .NET 4.5. The IO model is now "non-blocking" for these requests and the overally performance of the SDK has increased significantly. Change-Id: I9602882ba9a92bf5db1de98f75f2ce5b6f2ec596 Reviewed-on: http://review.couchbase.org/46996 Reviewed-by: Simon Baslé <simon@couchbase.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
#
a53409d9 |
| 02-Mar-2015 |
Simon Baslé <simon.basle@gmail.com> |
NCBC-811: Make operation lifespan configurable Motivation ---------- Currently, operations have a lifespan, a timeout for the whole thing to finish. It is defined as Timeout prop
NCBC-811: Make operation lifespan configurable Motivation ---------- Currently, operations have a lifespan, a timeout for the whole thing to finish. It is defined as Timeout property but its default value is in OperationBase'.cs (2500ms). This default value should be customizable, both programmaticaly and via the App.config file. It should also be possible to define it on a per bucket basis (overriding the value at cluster level). Modifications ------------- Removed the DefaultTimeout in OperationBase' and made so that all ctors of operations now require the timeout. Added the notion of OperationLifespanTimeout in ClientConfiguration + BucketConfiguration (programmatic API) and in CouchbaseClientSection + BucketElement (app.config). Programmatic API will track if default value has changed and update the bucket config accordingly. Each bucket implementation will extract the default operation lifespan from the BucketConfiguration (and fallback to using ClientConfiguration if no bucket configuration matches) at instantiation. After that, each call to an operation except those that may already have passed in a timeout will use this default operation lifespan. KeyObserver and SaslFactory both require the timeout to create a few operations, but they don't have a reference to the configuration. They now have their own DefaultTimeout (set to 2500ms for backward compat.). All tests use a default 2500ms timeout, when possible defined in a parent class (like OperationTestBase.cs), except TimerTests and FakeOperation that use 500ms. Added a few tests to validate configuration behavior. Result ------ WORK IN PROGRESS - need to fully run tests The lifespan timeout used by default for every operation can now be customized via configuration. Note that it only affect buckets created after the customization has been done as they cache the timeout value. Change-Id: If1f0e8faa44c9747f97152dca4bb855659ce0fed Reviewed-on: http://review.couchbase.org/47555 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
Revision tags: 1.3.11, 2.0.2, 2.0.1, 2.0ga |
|
#
e4fbacc6 |
| 02-Dec-2014 |
jeffrymorris <jeffrymorris@gmail.com> |
Provide clone overrides for each operation Motivation ---------- Add a clone override for each operation so that the operation can be cloned and it's (select) internal state pres
Provide clone overrides for each operation Motivation ---------- Add a clone override for each operation so that the operation can be cloned and it's (select) internal state preserved. This is useful for operation's that have failed for example with a NMV and will be retried. Modifications ------------- Override the virtual Clone method and provide's an operation specific implementation. Result ------ An operation can be cloned with operation specific fields preserved. The following fields are typically included: key, value (if exists), CAS, CreationTime and VBucket. Change-Id: Ifafcff0b8e83d5cc471fe8863aa5853fba613205 Reviewed-on: http://review.couchbase.org/43860 Tested-by: Jeffry Morris <jeffrymorris@gmail.com> Reviewed-by: Brett Lawson <brett19@gmail.com>
show more ...
|
#
dad4b8f9 |
| 06-Nov-2014 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-700: Add overload for Prepend/Append that accepts byte arrays Change-Id: I4aa4d425c9dddb347667d2d045e8d3cd1bf72fb9 Reviewed-on: http://review.couchbase.org/42882 Reviewed-by: Je
NCBC-700: Add overload for Prepend/Append that accepts byte arrays Change-Id: I4aa4d425c9dddb347667d2d045e8d3cd1bf72fb9 Reviewed-on: http://review.couchbase.org/42882 Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
#
3a926ae4 |
| 04-Nov-2014 |
jeffrymorris <jeffrymorris@gmail.com> |
Client-side operation timeouts Change-Id: Ia220d54f8a7b779df3dc80f1786fb4745d403619 Reviewed-on: http://review.couchbase.org/42795 Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Client-side operation timeouts Change-Id: Ia220d54f8a7b779df3dc80f1786fb4745d403619 Reviewed-on: http://review.couchbase.org/42795 Tested-by: Jeffry Morris <jeffrymorris@gmail.com> Reviewed-by: Brett Lawson <brett19@gmail.com>
show more ...
|
Revision tags: 1.3.10, 2.0-beta2 |
|
#
143df62b |
| 29-Oct-2014 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-704: Ensure opaque value is unique for all operation instances All operations are implementations of the base class OperationBase<T> which is generic. This class held a static varia
NCBC-704: Ensure opaque value is unique for all operation instances All operations are implementations of the base class OperationBase<T> which is generic. This class held a static variable to use as a counter base; which is flawed because for each type of T instantiated, a new static variable would be created because internally each type of T is compiled into it's own class. This moves the opaque generator into a new class, SequenceGenerator, so that the identifier is unique and incremented correctly. Change-Id: I7b159e896a086b40490177e158924655fa0c7166 Reviewed-on: http://review.couchbase.org/42573 Reviewed-by: Mark Nunberg <mnunberg@haskalah.org> Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|
#
8e2c4c12 |
| 29-Oct-2014 |
jeffrymorris <jeffrymorris@gmail.com> |
NCBC-703: When an operation timesout ensure that an NRE is not thrown Change-Id: Iba4be3d23a1d416b2c64a4d0c04d22b3ec0c9011 Reviewed-on: http://review.couchbase.org/42555 Reviewed-by:
NCBC-703: When an operation timesout ensure that an NRE is not thrown Change-Id: Iba4be3d23a1d416b2c64a4d0c04d22b3ec0c9011 Reviewed-on: http://review.couchbase.org/42555 Reviewed-by: Mark Nunberg <mnunberg@haskalah.org> Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com> Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
show more ...
|