-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.8
-
Component/s: None
-
None
-
Environment:fully updated windows 7 development machine
In the code i first fill the items to List.
var datas = new List<MyData>(); // 144000 MyData
then call the InsertBatch method.
var _collection = _mongoDatabase.GetCollection<MyData>("MYDATA", WriteConcern.Acknowledged);
_collection.InsertBatch(datas);
this throws these exceptions. if I look at the collection i see all the data inserted correctly. When I try with 10k data it works correctly. The data is clear in all lines. It is probably the size problem but the exception is miss leadling.
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
WriteConcern detected an error 'E11000 duplicate key error index: MYDB.MYDATA.$id dup key: { : ObjectId('51681daf1e72b21b1839877b') }'. (Response was { "err" : "E11000 duplicate key error index: MYDB.MYDATA.$id dup key: { : ObjectId('51681daf1e72b21b1839877b') }", "code" : 11000, "n" : 0, "connectionId" : 19, "ok" : 1.0 }).
- duplicates
-
CSHARP-715 InsertBatch fails when large batch has to be split into smaller sub batches
- Closed