[DOCS-7592] Comment on: "manual/reference/command/findAndModify.txt" Created: 07/Apr/16  Updated: 03/Nov/17  Resolved: 07/Apr/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

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


Participants:
Days since reply: 7 years, 44 weeks, 1 day ago

 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.



 Comments   
Comment by Githook User [ 13/Apr/16 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-7592 clarify that the unique index in upsert section refers to name index
Branch: master
https://github.com/mongodb/docs/commit/fdcdc266262e983c44d10dc60ce3c1b0e0bf4903

Comment by Kay Kim (Inactive) [ 07/Apr/16 ]

Emailed reporter as findAndModify with the upsert:true – on the retry would perform an update.

Generated at Thu Feb 08 07:54:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.