[GODRIVER-123] Implement BulkWrite API Created: 10/Nov/17  Updated: 28/Oct/23  Resolved: 11/Oct/18

Status: Closed
Project: Go Driver
Component/s: CRUD
Affects Version/s: None
Fix Version/s: 0.0.16

Type: New Feature Priority: Major - P3
Reporter: David Golden Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: FY2019Q3, Stitch, beta
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by GODRIVER-584 Implement bulkWrite functionality Closed

 Description   

The CRUD API spec calls for a bulkWrite methods like so:

bulkWrite(requests: WriteModel[], options: Optional<BulkWriteOptions>): BulkWriteResult;

This is not particularly idiomatic for Go and it requires pre-allocating all the models, which isn't ideal for "open-ended" operations.

We should consider a more idiomatic approach and implement that instead of the literal method called for in the CRUD spec.



 Comments   
Comment by Githook User [ 11/Oct/18 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: Implement BulkWrite API

GODRIVER-123

Change-Id: Ica3dd7322d93efecaa953c6ff691dace6e184088
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/4cb519e8e22f6c951c9f1c521296966efb224e49

Comment by Thulasidhar JK [ 03/Oct/18 ]

Hi,
I am looking for this feature for bulk updating multiple documents in one go. I have a system where we process events in batches and batch size is in 1000 items, which would result in updating 1000 different documents. Having a bulk write with an array of 1000 update operations would be more efficient than 1000 individual updates.

Comment by David Golden [ 21/Mar/18 ]

We've decided to implement only bulk-insert in the short term (GODRIVER-124) and will defer decisions about a bulk API until later when we can build a better use-case for why users need a mechanism to interleave write operations.

Generated at Thu Feb 08 08:33:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.