[CDRIVER-2094] mongoc_bulk_operation_new does not set same fields as _mongoc_bulk_operation_new Created: 22/Mar/17  Updated: 07/Mar/23

Status: Backlog
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: David Golden Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

As best I understand it, these functions are intended as follows:

  • mongoc_bulk_operation_new – for other language drivers to construct client/collection/database agnostic bulk operations
  • _mongoc_bulk_operation_new – for libmongoc to construct bulk operations for it's own bulk API

While _mongoc_bulk_operation_new calls mongoc_bulk_operation_new, it goes on to set several additional fields, such as executed and flags. Some are set in mongoc_bulk_operation_new but in subtly different ways.

As wrapper library developers, we're concerned that we'll have to continually monitor the delta between these functions and patch how we configure the mongoc_bulk_operation_t based on what we see done in _mongoc_bulk_operation_new and the places in the code that call it.

We suggest harmonizing these two (or creating a separate initializer), ideally building the libmongoc bulk implementation the same way an external wrapper would, rather than continuing with the split initialization that exists today.


Generated at Wed Feb 07 21:14:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.