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

operation_id bugs in command monitoring callbacks

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      In our current Application Performance Monitoring (APM) implementation, a series of commands could be monitored with the same operation_id. We must generate unique ids.

      Also, a series of commands related to the same mongoc_bulk_operation_t could have different ids, since we use the mongoc_cluster_t's operation_id instead of the mongoc_bulk_operation_t's. We should monitor all commands for one bulk operation with the same id, from the mongoc_bulk_operation_t.

      And finally, mongoc_bulk_operation_new creates a bulk op with operation_id of zero. The bug described above means we aren't using the mongoc_bulk_operation_t's operation_id, anyway, but we should fix that and also initialize the operation_id.

      Original report from David Golden:

      "mongoc_bulk_operation_new does not fully initialize the structure"

      mongoc_bulk_operation_new and _mongoc_bulk_operation_new initialize the data structure in subtly different ways. It's not clear why these are different and I'm concerned that HLL wrappers are missing something by using mongoc_bulk_operation_new instead of _mongoc_bulk_operation_new.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: