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

Partial result may be populated after client-side error in first client bulk write operation

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 1.28.0
    • Component/s: CRUD
    • None
    • Not Needed
    • None
    • C Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      InĀ CRUD prose test 12, which asserts client-side errors from the first and only write modle, a partial result is still populated in mongoc_bulkwritereturn_t.res. This seemingly runs afoul of the following line in the spec:

      Drivers MUST NOT populate the partialResult field in BulkWriteException if it cannot be determined that at least one write was successfully performed.

      Looking at mongoc_bulkwrite_execute, this may be due to assuming has_successful_results = true if ret.res->errorscount == 0 for an ordered write. errorscount is only incremented in _bulkwritereturn_apply_reply, which presumably would never have been called.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None