[DOCS-8063] Comment on: "manual/reference/command/findAndModify.txt" Created: 07/Jun/16  Updated: 30/Oct/23  Resolved: 07/Mar/23

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Trivial - P5
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: collector-298ba4e7, quick-win
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Web Content (Desktop Version)

Location: https://docs.mongodb.com/manual/reference/command/findAndModify/#dbcmd.findAndModify
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Referrer: https://docs.mongodb.com/manual/reference/method/db.collection.findAndModify/
Screen Resolution: 1920 x 1080


Participants:
Days since reply: 7 years, 36 weeks, 1 day ago
Story Points: 0.1

 Description   

Would be great if there was a section about Replica Set scenarios. Does this hit the primary? Or could the "find" portion fail if the document was just created and secondaryPreferred is set to true?



 Comments   
Comment by Ravind Kumar (Inactive) [ 07/Jun/16 ]

Hello,

Write operations can only ever happen on the primary member of a replica set.

findAndModify is a write operation, so it occurs on the primary replica set member only.

I hope this answers your question.

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