[SERVER-45955] findAndModify should not take exclusive locks Created: 04/Feb/20  Updated: 29/Oct/23  Resolved: 01/Apr/20

Status: Closed
Project: Core Server
Component/s: Concurrency, Write Ops
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Maria van Keulen Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-45956 Allow findAndModify with upsert=true ... Closed
Related
related to SERVER-47665 findAndModify_upsert_no_conflicts.js ... Closed
related to SERVER-47123 Remove AutoGetOrCreateDb Closed
related to SERVER-46615 Audit and replace all old-style updat... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Sprint: Execution Team 2020-03-23, Execution Team 2020-04-06
Participants:

 Description   

findAndModify takes exclusive database locks for upserts. It should not need to do this as of the finer-grained locks work, nor should it need to take an exclusive collection lock as of SERVER-43859 to create the collection.

Any exclusive db/collection lock acquisitions in findAndModify should be changed to intent exclusive acquisitions.



 Comments   
Comment by Githook User [ 02/Apr/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-45955 Make findAndModify not take database MODE_X lock

(cherry picked from commit 3c78c7dd07811172f37d39f4924b706d871dfeab)
Branch: v4.4
https://github.com/mongodb/mongo/commit/df7ad9a3574142866fc1f604d2b47b9ca91ae437

Comment by Githook User [ 01/Apr/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-45955 Make findAndModify not take database MODE_X lock
Branch: master
https://github.com/mongodb/mongo/commit/3c78c7dd07811172f37d39f4924b706d871dfeab

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