Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4436

Incomplete InsertedIds in InsertManyResult

    • Not Needed

      We have found that calling the insertMany and passing in a list of thousands of documents (i.e. 10.000 documents each one with a size of 10Kb), the returned InsertManyResult object contains incomplete results. 

      In particular, by calling the getInsertedIds() method on the result object it reports a list of about 2/3000 documents intead of the expected 10.000.

      We found that by using the bulkWrite method on the same list of documents we get the same results with incomplete getInserts() but with correct getInsertedCount().

      We are using the java driver version 4.4.0 on a sharded cluster based on 4.4.10 community server.

      The problem seems to be related to the automatic splitting of the write operation in many batches.

       

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            andrea.pinciroli@padigitale.it Andrea Pinciroli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: