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: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Bulk API, libmongoc
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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:
              Resolved: