[NCBC-662] Common Flags improperly decoding configs as a String type causing cast exception Created: 01/Oct/14  Updated: 01/Oct/14

Status: Open
Project: Couchbase .NET client library
Component/s: library
Affects Version/s: 2.0 Beta
Fix Version/s: 2.0.0

Type: Bug Priority: Blocker
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
When a NMV triggers a Config response, the body of the response is decoded and serialized into a string instead of BucketConfig object causing a cast exception and keeping the client from updating:

2014-10-01 19:38:34,748 [14] ERROR Couchbase.Core.Buckets.CouchbaseBucket - System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Couchbase.Configuration.Server.Serialization.BucketConfig'.
   at Couchbase.Core.Transcoders.DefaultTranscoder.Decode[T](Byte[] buffer, Int32 offset, Int32 length, Flags flags) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Transcoders\DefaultTranscoder.cs:line 157
   at Couchbase.IO.Operations.OperationBase`1.GetConfig() in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\IO\Operations\OperationBase'.cs:line 383
   at Couchbase.Core.Buckets.CouchbaseBucket.CheckForConfigUpdates[T](IOperationResult`1 operationResult, IOperation operation) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\CouchbaseBucket.cs:line 238
2014-10-01 19:38:34,750 [14] DEBUG Couchbase.Core.Buckets.CouchbaseBucket - Operation retry 0 for key key1845. Reason: VBucketBelongsToAnotherServer




[NCBC-661] When the only operation are view requests, updated configs are not sent to client Created: 28/Sep/14  Updated: 29/Sep/14

Status: Open
Project: Couchbase .NET client library
Component/s: library
Affects Version/s: 2.0 Beta
Fix Version/s: 2.0.0

Type: Bug Priority: Critical
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
When the client has boot straps using "Optimized configuration management" and the only operation being performed, the client never updates it's server configuration, because it doesn't have any means of knowing that it has changed.

 Comments   
Comment by Jeff Morris [ 29/Sep/14 ]
Two Scenarios:
1. Node is added while load is view specific
2. Node is removed while load is view specific

Note that when a node is removed, the server first returns the following message:

Error: noproc. Reason: {gen_server,call,[request_throttler,{note_request,<0.8540.71>,capi},infinity]}.

For several requests, followed by:

{"error":"not_found","reason":"missing"}

For scenario #1, there is no way for the client to be aware of the added node unless it polls or receives a config update asynchronously. For #2, we could use the response message, but the "noproc" message is only returned for a short time and the "not_found" message is the same message returned when the bucket doesn't exist - if the view or design doc doesn't, it's noted in the error message. For example:

{"error":"not_found","reason":"Error opening view `brewery_beers2`, from set `beer-sample`, design document `_design/beer`: {not_found,\n missing_named_view}"}






[NCBC-660] Exception: SafeHandle has been closed in MemcachedBucket.MultiGet method. Created: 28/Sep/14  Updated: 30/Sep/14  Resolved: 30/Sep/14

Status: Resolved
Project: Couchbase .NET client library
Component/s: library
Affects Version/s: 2.0 Beta
Fix Version/s: 2.0.0

Type: Bug Priority: Critical
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
   at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
   at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
   at System.Security.Cryptography.Utils.HashData(SafeHashHandle hHash, Byte[] data, Int32 cbData, Int32 ibStart, Int32 cbSize)
   at System.Security.Cryptography.MD5CryptoServiceProvider.HashCore(Byte[] rgb, Int32 ibStart, Int32 cbSize)
   at System.Security.Cryptography.HashAlgorithm.ComputeHash(Byte[] buffer)
   at Couchbase.Core.Buckets.KetamaKeyMapper.GetHash(String key) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\KetamaKeyMapper.cs:line 80
   at Couchbase.Core.Buckets.KetamaKeyMapper.MapKey(String key) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\KetamaKeyMapper.cs:line 38
   at Couchbase.Core.Buckets.MemcachedBucket.GetServer(String key) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\MemcachedBucket.cs:line 100
   at Couchbase.Core.Buckets.MemcachedBucket.SendWithRetry[T](IOperation`1 operation) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\MemcachedBucket.cs:line 110
   at Couchbase.Core.Buckets.MemcachedBucket.Get[T](String key) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\MemcachedBucket.cs:line 595
   at Couchbase.Core.Buckets.MemcachedBucket.<>c__DisplayClass23`1.<Get>b__22(Tuple`2 range, ParallelLoopState loopstate) in c:\Users\jmorris\repos\CouchbaseNetClient-Build-2.0\couchbase-net-client\Src\Couchbase\Core\Buckets\MemcachedBucket.cs:line 614
   at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)

 Comments   
Comment by Jeff Morris [ 30/Sep/14 ]
Fixed by: http://www.couchbase.com/issues/browse/NCBC-659




[NCBC-659]  Make KetamaKeyMapper and VBucketKeyMapper Dispose HashAlgorithm after every use Created: 28/Sep/14  Updated: 30/Sep/14  Resolved: 30/Sep/14

Status: Resolved
Project: Couchbase .NET client library
Component/s: library
Affects Version/s: 2.0 Beta
Fix Version/s: 2.0.0

Type: Bug Priority: Critical
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This class maintains a reference to HashAlgorithm which has a Dipose method which is not called.

 Comments   
Comment by Jeff Morris [ 30/Sep/14 ]
Refactored both KeyMapper's so that they create and Dispose HashAlgorithm instance after every use. If they are not disposed, they will end up in the finalization queue and cause pressure there. Also, it appears if you reuse the instance, it may become corrupted in multi-threaded environments; this resolves that potential issue.




[NCBC-658] Fix bug where "/pools" is not added to bootstrap urls when configuration is app.config Created: 28/Sep/14  Updated: 28/Sep/14  Resolved: 28/Sep/14

Status: Resolved
Project: Couchbase .NET client library
Component/s: library
Affects Version/s: 2.0 Beta
Fix Version/s: 2.0.0

Type: Bug Priority: Major
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





Generated at Thu Oct 02 09:35:26 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.