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

Allow getting hint for node from failed bulk write operations

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.0
    • Affects Version/s: 1.0.0
    • Component/s: None
    • None

      The PHP prototype is currently using mongoc_bulk_operation_execute() exclusively for write operations. This function returns an integer hint for the node servicing the write on success; however, no hint is returned if an error occurs. That's fine for client-side errors such as empty batches, but I think it'd be helpful to report the hint for server-side errors.

      I understand we can't change the function signature, but can the hint be made accessible on the reply bson_t without breaking BC? Alternatively, is there another way that I can extract the hint immediately after an unsuccessful call to mongoc_bulk_operation_execute() (perhaps something similar to how mongoc_collection_get_last_error() works)?

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: