Details
-
Bug
-
Resolution: Works as Designed
-
Unknown
-
None
-
3.12.10, 4.3.4
Description
How to Reproduce
- Do a replaceOne for a document and have the server return a NotWritablePrimary error.
- When the driver retries, have it hang waiting for write concern
- Kill (-9) the server being retried on.
- Error returned is com.mongodb.MongoNotPrimaryException, indicating the replace didn't happen, though in fact it may have.
If findOneAndReplace is used instead of replaceOne, a MongoSocketReadException is returned instead.