Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2094

mongoc_bulk_operation_new does not set same fields as _mongoc_bulk_operation_new

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Bulk API, libmongoc
    • Labels:
      None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: