[CSHARP-693] InsertBatch must call GLE after all sub-batches (except perhaps the last) even if WriteConcern is Unacknowledged Created: 01/Mar/13 Updated: 20/Mar/14 Resolved: 29/Apr/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.7.1, 1.8.1 |
| Fix Version/s: | 1.8, 1.8.2 |
| 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: |
|
||||||||
| Backwards Compatibility: | Minor Change | ||||||||
| Description |
|
When InsertBatch is called with more documents than can fit in a single message to the server it breaks up the large batch into smaller sub-batches that do fit into a single message. To maintain the semantics that a batch stops as soon as the first error is encountered (when ContinueOnError is false) InsertBatch must call GLE after all sub-batches (except perhaps the last) even if WriteConcern is Unacknowledged. Otherwise it wouldn't know that an error occurred and that it should stop sending any additional sub-batches. |
| Comments |
| Comment by auto [ 29/Apr/13 ] |
|
Author: {u'date': u'2013-04-29T17:59:59Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |
| Comment by Robert Stam [ 29/Apr/13 ] |
|
Reopening the issue to make a minor change to how errors are handled. The desired behavior is: 1. WriteConcern enabled and ContinueOnError is false Add the requested GLE after each sub-batch and throw an exception when the first error occurs. Otherwise return a list of the GLE results. 2. WriteConcern enabled and ContinueOnError is true Add the requested GLE after each sub-batch but keep going even if an error is detected. After the final sub-batch, throw an exception if an error was detected after any sub-batch. Otherwise return the list of the GLE results. 3. WriteConcern disabled and ContinueOnError is false Add a GLE (w=1) after each sub-batch except the last. If an error is detected after any sub-batch stop processing any further batches and return null. 4. WriteConcern disabled and ContinueOnError is true Send all sub-batches without a GLE. Return null. |
| Comment by auto [ 07/Mar/13 ] |
|
Author: {u'date': u'2013-03-06T16:24:55Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |