[SERVER-11079] Return updated doc from update function Created: 08/Oct/13 Updated: 06/Dec/22 Resolved: 09/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.5.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | findAndModify | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query
|
| Participants: |
| Description |
|
In the UpdateResult we should expose the newly updated (or inserted) doc for use by the caller. This would be useful from findAndModify so another query doesn't need to be sent when returning the "new" document version. Simple testing show this to be at least 8% of the total call time on an unloaded server – but it will be much worse on an active system where yields can occur. |