Allow getting hint for node from failed bulk write operations

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 1.4.0
    • Affects Version/s: 1.0.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • 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:
              A. Jesse Jiryu Davis
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: