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

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.