Driver aborts during OP_MSG bulk write if command fails mid batch

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.15.0
    • Affects Version/s: 1.13.1
    • Component/s: Bulk API, libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The bug report of CDRIVER-3195 appears to be due to mishandling of OP_MSG bulk writes when we fail to write to the server socket in the middle of a batch.

      result->must_stop, which was introduced in CDRIVER-1556, indicates if a bulk write should stop attempting commands due to a socket disconnect. It is checked in _mongoc_write_opquery but not checked in _mongoc_write_opmsg. So we attempt the sending next OP_MSG without having a socket.

      I've reproduced on 1.13.1 and master, but I suspect this goes back to our initial OP_MSG support in 1.9.

              Assignee:
              Kevin Albertson
              Reporter:
              Kevin Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: