[SERVER-80293] Add more summary fields to bulkWrite response Created: 21/Aug/23 Updated: 10/Nov/23 Resolved: 09/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sean Zimmerman | Assignee: | Sean Zimmerman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | milestone-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Replication
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Repl 2023-11-13 | ||||||||
| Participants: | |||||||||
| Description |
|
See https://mongodb.slack.com/archives/C035ZJL6CQN/p1692638285661919 for more context We originally added numErrors as a summary field so the driver wouldn't have to iterate the cursor to see if any errors occurred. We want to provide the same for them for nInserted, nMatched, nModified, nUpserted, nDeleted so the driver can choose to not request a cursor (batchSize 0) and only return summary fields as an API option This ticket is to support these fields on both mongod and mongos This should also change numErorrs to nErrors for consistency with the new fields As part of this we should add singleBatch as an option to the bulkWrite command which will act the same as for other cursor commands (like find) where we only return the firstBatch and do not save the remaining results in a cursor to be fetched later |
| Comments |
| Comment by Githook User [ 09/Nov/23 ] |
|
Author: {'name': 'seanzimm', 'email': 'sean.zimmerman@mongodb.com', 'username': 'seanzimm'}Message: |
| Comment by Lingzhi Deng [ 06/Sep/23 ] |
|
Currently for cursor commands, a batchSize of 0 means that the cursor will be established, but no documents will be returned in the first batch. So I am not sure if we still want to make (batchSize 0) behave differently for bulkWrite. |