[SERVER-46615] Audit and replace all old-style update calls with new update implementation Created: 04/Mar/20  Updated: 06/Dec/22

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

Type: Improvement Priority: Major - P3
Reporter: Maria van Keulen Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-45955 findAndModify should not take exclusi... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

There are presently code paths in which upsert takes exclusive database locks (e.g., SERVER-45955). It looks like there is also an update helper that takes an exclusive database lock for upsert. This update helper is currently used in various places, e.g., during oplog application, as well as in the dbhelpers upsert and putSingleton methods.

Any usages of this old-style update() method should be replaced with an equivalent write_ops_exec based implementation, to avoid the costly exclusive database lock and to guarantee consistency of implementation.



 Comments   
Comment by Maria van Keulen [ 04/Mar/20 ]

A nice contingency plan for this ticket, if it is not feasible to completely replace all calls to the old-style update helper, would be to only require MODE_IX database and collection locks in the old-style update helper instead of the MODE_X database lock.

Generated at Thu Feb 08 05:11:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.