JAVA-6102ClosedGone away
Upsert race condition
h4. Summary When performing an update with updateOne and using UpdateOptions().upsert(true) , a race condition can occur, causing a DuplicateKeyException to be thrown (which should be impossible for an upsert). This likely occurs because there is a race happening here: * Upsert-logic checks if the document already exists, finds that it doesn't and chooses to go with insert instead of update * Another process inserts that document * Now the insert fails with duplicate key __ This