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

Do not call mongoc_bulk_operation_set_let unnecessarily

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.22.0, 1.22.0-beta0
    • None
    • Bulk API
    • None

    Description

      mongoc_collection_create_bulk_operation_with_opts always calls mongoc_bulk_operation_set_let. If the let option was never specified, this is redundant as mongoc_bulk_operation_new already initializes it to an empty BSON document. Instead, we should gate the setter with a bson_empty check:

      if (!bson_empty (&bulk_opts.let)) {
         mongoc_bulk_operation_set_let (bulk, &bulk_opts.let);
      }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: