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.