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

Driver aborts during OP_MSG bulk write if command fails mid batch

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: 1.13.1
    • Component/s: Bulk API, libmongoc
    • 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@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: