I’m having an issue using Couchbase with the newest version of the .NET assemblies (1.2). My goal is to select 150,000 records from my current Oracle Database and migrate the entire object into the Couchbase Data-Bucket. The 150k records are stored as objects in objectList (belo
The following code seems to give me somewhere between 100,000 – 120,000 failures every time I run it. Does anyone know what may be the cause or how to best debug this issue? However, every time I run it, different sets of objects are added into the data-bucket, which makes me even more confused.
int failures = 0;
foreach (var obj in objectList) {
var result = client.StoreJson(StoreMode.Set, obj.Id, obj);
if (!result) failures++;
}
For debugging purposes I would suggest that instead of using the extension method
StoreJsonyou useExecuteStore. You will have to perform the serialization step as well.The difference between these methods is that while StoreJson returns just a
boolvalue, ExecuteStore returns the actualIOperationResultwhich will tell you what happend. There is a status code on that object and the exception message, if any.http://www.couchbase.com/docs/couchbase-sdk-net-1.2/api-reference-set.html