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

Client assertions in opts validation breaks existing usage for bulk API

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.24.1
    • Affects Version/s: 1.24.0
    • Component/s: Bulk API
    • Labels:
      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 Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: