[CXX-2095] a bulk_write operation (created by create_bulk_write()) cannot be reinitialised Created: 19/Aug/20  Updated: 27/Oct/23  Resolved: 20/Aug/20

Status: Closed
Project: C++ Driver
Component/s: Implementation, Performance
Affects Version/s: 3.5.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: kaustubh shamshery Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Say I call 

auto bulk = coll.create_bulk_write();

and append some writes and call

auto result = bulk.execute();

Afterwards, every object created using .create_bulk_write from now on fails and does not execute.

 

Is there some way to reinitialise the object created by create_bulk_write()

 

 



 Comments   
Comment by kaustubh shamshery [ 20/Aug/20 ]

Issue Resolved, Kindly delete this.  . Apologies.

Comment by kaustubh shamshery [ 19/Aug/20 ]

Code Example

 
auto txnCollection = GetCollection(m_txnCollectionName);
 
auto bulk = txnCollection.create_bulk_write();
bulk.append(insert_op1); 

bulk.append(insert_op2); //This one is invalid due to unique key error

bulk.execute(); //One executes and I catch the error for the other one

auto bulk2 = txnCollection.create_bulk_write();

 

bulk2.append(insert_op3); //insert_op3 is valid 

 

bulk2.execute() //Fails due to previous error

 

 

 

Generated at Wed Feb 07 22:04:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.