Skip to content

Commit 605b090

Browse files
committed
CDRIVER-570: Executing bulk without write concern should inherit from client
When using mongoc_bulk_operation_new() to construct a bulk operation (not through a collection), one would expect the client's write concern to be used at execution time if an explicit write concern is not set on the bulk operation. That functionality is already handled by _mongoc_write_command_execute(), but it requires we not initialize a new write concern on the bulk operation.
1 parent bea5bc4 commit 605b090

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/mongoc/mongoc-bulk-operation.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,6 @@ mongoc_bulk_operation_execute (mongoc_bulk_operation_t *bulk, /* IN */
314314

315315
bson_return_val_if_fail (bulk, false);
316316

317-
if (!bulk->write_concern) {
318-
bulk->write_concern = mongoc_write_concern_new ();
319-
}
320-
321317
if (bulk->executed) {
322318
_mongoc_write_result_destroy (&bulk->result);
323319
}

0 commit comments

Comments
 (0)