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

BulkWriteError's request is not the correct one

    XMLWordPrintable

    Details

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

      Description

      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

       

       

        Attachments

          Activity

            People

            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

              Dates

              Created:
              Updated:
              Resolved: