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

BulkWriteError's request is not the correct one

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.1
    • Affects Version/s: 1.2.0
    • Component/s: Error Handling
    • Labels:
      None
    • Environment:
      mongo 3.4

      When initializing the BulkWriteError, the document set is not the correct one, the first document of the batch is used instead, it should used the document in the batch at the index returned by the WriteError (https://github.com/mongodb/mongo-go-driver/blob/b414b897457665f12997cefd10ad934ccb9dfb3e/mongo/errors.go#L129)

      https://github.com/mongodb/mongo-go-driver/blob/b414b897457665f12997cefd10ad934ccb9dfb3e/mongo/bulk_write.go#L156

       

       

            Assignee:
            go-community-user Go Community User
            Reporter:
            emilien@sendinblue.com emilien puget
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: