[CSHARP-715] InsertBatch fails when large batch has to be split into smaller sub batches Created: 27/Mar/13  Updated: 20/Mar/14  Resolved: 27/Mar/13

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.8.1

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by CSHARP-725 InsertBatch throws duplicate key exce... Closed

 Description   

The ResetBatch internal method in MongoInsertMessage.cs is not resetting the length of the buffer which results in more bytes being sent to the server than should be sent. Because the extra bytes are somewhat random the most likely outcome is that the server will complain that a message length (the first 4 of the extra bytes) is too large.



 Comments   
Comment by auto [ 27/Mar/13 ]

Author:

{u'date': u'2013-03-27T18:18:28Z', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-715: Add unit test for InsertBatch with small final subbatch.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/2b69d8554b3d80d2327e056e35d6395e3cfcdf45

Comment by auto [ 27/Mar/13 ]

Author:

{u'date': u'2013-03-27T17:44:38Z', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-715: InsertBatch fails when large batch has to be split into smaller sub batches.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/7e7b57a33821da5cdf339c55f583761c58fdfa9d

Generated at Wed Feb 07 21:37:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.