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

Client assertions in opts validation breaks existing usage for bulk API

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 1.24.1
    • 1.24.0
    • Bulk API
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: