[SERVER-47294] Execution Architecture Guide: Concurrency Control Created: 02/Apr/20  Updated: 29/Oct/23  Resolved: 05/Aug/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Eric Milkie
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-47610 Execution Architecture Guide: Catalog... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-08-10
Participants:

 Description   

Rough starting outline:

Concurrency Control
    Lock Modes
    Lock Granularity
            (Different storage engines can support different levels of granularity.)
        Lock Acquisition Order
            (discuss lock acquisition order)
            (mention risk of deadlocks motivation)
        Replication State Transition Lock (RSTL)
        Parallel Batch Writer Mode Lock (PBWM)
        Global Lock
        Database Lock
        Collection Lock
        Document Level Concurrency Control
            (Explain WT's optimistic concurrency control, and why we do not need document locks in the MongoDB layer)
        Mutexes
        FCV Lock
    Two-Phase Locking
        (We use this for transactions? Explain)
    Replica Set Transaction Locking
        (TBD: title of this section -- there is some confusion over what terminology will be best understood)
        (Stashing and unstashing locks for replica set level transactions across multiple statements.)
        (Read's IS locks are converted to IX locks in replica set transactions.)
    Locking Best Practices
        Network Calls
            (i.e., never hold a lock across a network call unless absolutely necessary)
        Long Running I/O
            (i.e., don't hold a lock across journal flushing)
        FCV Lock Usage

Definitely feel free to alter the layout and file additional tickets split the work into more manageable units. Please add topics if you can think of any. This outline is meant only to be a starting point.

A couple helpful links for markdown basics:
https://www.markdowntutorial.com/
https://gist.github.com/asabaylus/3071099
https://markdownlivepreview.com/



 Comments   
Comment by Githook User [ 05/Aug/20 ]

Author:

{'name': 'Eric Milkie', 'email': 'milkie@10gen.com', 'username': 'milkie'}

Message: SERVER-47294 Concurrency Architecture Guide
Branch: master
https://github.com/mongodb/mongo/commit/0340f9679e05ca78bc7fea39808e80d7c7f80bc9

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