-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.