[SERVER-4469] Make findAndModify behave as expected Created: 10/Dec/11  Updated: 12/Oct/14  Resolved: 05/Dec/13

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 2.0.1
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Christian Amor Kvalheim Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: driver, findAndModify, server
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

any


Issue Links:
Duplicate
duplicates SERVER-6558 findAndModify should take a write con... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

as it works today findAndModify calls lastError and returns a getLastError object as part of the command. However this does not work for replicasets as there is no possibility to to pass w and wtimeout to the command so the drivers have to execute a lastError command again after the findAndModify. So my question is can we 1 let findAndModify take w and associated parameters or 2 remove the lastError call as part of findAndModify to make it work as insert, update and remove ?

I would prefer option 1 as it does not break backward compatibility.



 Comments   
Comment by Scott Hernandez (Inactive) [ 05/Dec/13 ]

dup of SERVER-6558

Generated at Thu Feb 08 03:06:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.