Client assertions in opts validation breaks existing usage for bulk API

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 1.24.1
    • Affects Version/s: 1.24.0
    • Component/s: Bulk API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      CDRIVER-4255 added assertions for client and pool parameters throughout libmongoc, which subtly broke the PHP driver's use of bulk operations.

      The PHP driver allows construction of a BulkWrite object independent of a client. This uses mongoc_bulk_operation_new instead of mongoc_collection_create_bulk_operation_with_opts. Applications then append insert, update, and delete operations to this object. At execution time, the BulkWrite object is passed to a client method (e.g. Manager::executeBulkWrite()), which calls mongoc_bulk_operation_set_client to assign the appropriate client.

      The problematic addition in CDRIVER-4255 was adding assertions to mongoc-opts.c.template.

              Assignee:
              Unassigned
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: