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: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.1.0, 2.0.1, 1.30.4
    • Affects Version/s: 1.28.0
    • Component/s: CRUD
    • None
    • Not Needed
    • None
    • Minor Change
    • C Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • 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:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: