Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2651

Operation returns nil error if original and retry have `NoWritesPerformed` label

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.11.1
    • Affects Version/s: None
    • Component/s: None
    • None

      Summary

      1. If both the original and retry return errors with the NoWritesPerformed label, the operation returns nil.

      Here is a failing test reproducing the issue: https://github.com/kevinAlbs/mongo-go-driver/commit/ed23feeaaa69e7b7a47c2553c6a7866a595b57d9

      2. The stored prevIndefiniteErr does not undergo further error processing. For example, the following is skipped when storing the prevIndefiniteErr:

      if batching && len(tt.WriteErrors) > 0 && currIndex > 0 {
      	for i := range tt.WriteErrors {
      		tt.WriteErrors[i].Index += int64(currIndex)
      	}
      }
      

      That may result in incorrect Index if the prevIndefiniteErr is returned.

            Assignee:
            preston.vasquez@mongodb.com Preston Vasquez
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: