Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Windows 7, mongodb version 3.0.2
*Location*: https://docs.mongodb.org/manual/reference/command/findAndModify/
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
*Screen Resolution*: 1366 x 768
*repo*: docs
*source*: reference/command/findAndModify
Windows 7, mongodb version 3.0.2 *Location*: https://docs.mongodb.org/manual/reference/command/findAndModify/ *User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 *Screen Resolution*: 1366 x 768 *repo*: docs *source*: reference/command/findAndModify
Description
https://docs.mongodb.org/manual/reference/command/findAndModify/
There is a dotted lines in the last paragraph of "Upsert and Unique Index" section as follows:
Zero or more findAndModify commands fail when they attempt to insert a duplicate. If the command fails due to a unique index constraint violation, you can retry the command. Absent a delete of the document, the retry should not fail.
I belive it's completely wrong description. Once violation occurred due to the unique index, retry the command repeat the same violation.
So the last line, "the retry should not fail" is wrong.
Or maybe I don't understand the description. Please review & revise the description.