fakemongo / fongo

faked out in-memory mongo for java
Apache License 2.0
523 stars 156 forks source link

RE: Unordered MongoCollection#insertMany does not insert documents after first failed insertion #318

Open jameschensmith opened 6 years ago

jameschensmith commented 6 years ago

I would like to request a follow up for issue #311. I see that support for unordered inserts is in master and coverage has been written for Document objects, but I don't see the following line in version 2.1.0. What I see is the following:

BulkWriteOperation bulkWriteOperation = collection.initializeOrderedBulkOperation();

To replicate what I am testing in my code, I am using MongoCollection#insertMany on a collection with POJOCodec support. Just a basic insert:

supplyItemCollection.insertMany(supplyItemList, new InsertManyOptions().ordered(false));

Upon testing with a debugger, I noticed that it seems to possibly use the unordered option when executing, but when verifying in the test any non-duplicate items are not inserted into the collection if they are inserted after the duplicate items.

Can someone please let me know why the issue was closed, and when will the support for unordered insertions be released? Thanks.