[SERVER-59074] Do not acquire storage tickets just to set/wait on oplog visibility Created: 03/Aug/21  Updated: 29/Oct/23  Resolved: 10/Aug/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.16, 4.0.27, 4.4.10, 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-59219 Investigate whether the RecordStore o... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Execution Team 2021-08-09, Execution Team 2021-08-23
Participants:
Case:

 Description   

When we wait on oplog visibility with waitForAllEarlierOplogWritesToBeVisible, and when we set oplog visibility with oplogDiskLocRegister, we acquire a global lock, which automatically takes a storage read ticket. Together, doing both can result in a deadlock. Just having waitForAllEarlierOplogWritesToBeVisible take a ticket can result on local reads blocking behind reads with a read concern that's waiting for oplog writes. Since neither operation affects the resources protected by read tickets, we should use skipAcquireTicket() when acquiring these locks.

(We may need an RAII type to set/restore that flag)



 Comments   
Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59074 Do not acquire storage tickets just to set/wait on oplog visibility

(cherry picked from commit 64dd4524434f617b480e742e8dc421cccd8231fa)
Branch: v5.0
https://github.com/mongodb/mongo/commit/c991551356a29e30a59979fd1b2eed675a3ad2bb

Comment by Githook User [ 17/Sep/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59074 Do not acquire storage tickets just to set/wait on oplog visibility

(cherry picked from commit 0dd96157fb1fffc8eefe6be4b26aff9805bfbfac)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0914419373038ae1918e8297ecea321046dbdc6a

Comment by Githook User [ 17/Sep/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59074 Do not acquire storage tickets just to set/wait on oplog visibility

(cherry picked from commit 64dd4524434f617b480e742e8dc421cccd8231fai)
Branch: v4.4
https://github.com/10gen/mongo-enterprise-modules/commit/a4b7f33e53e1df4532dc60488a5cff236d8cdd5b

Comment by Githook User [ 25/Aug/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59074 Do not acquire storage tickets just to set/wait on oplog visibility

(cherry picked from commit 64dd4524434f617b480e742e8dc421cccd8231fai)
Branch: v4.2
https://github.com/mongodb/mongo/commit/0dd96157fb1fffc8eefe6be4b26aff9805bfbfac

Comment by Githook User [ 25/Aug/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59074 Do not acquire storage tickets just to set/wait on oplog visibility

(cherry picked from commit 64dd4524434f617b480e742e8dc421cccd8231fai)
Branch: v4.2
https://github.com/10gen/mongo-enterprise-modules/commit/dafb70612787ba13382ffd65bd3bd9427bdcdb1c

Comment by Githook User [ 20/Aug/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59074 Do not acquire storage tickets just to set/wait on oplog visibility

(cherry picked from commit 64dd4524434f617b480e742e8dc421cccd8231fai)
Branch: v4.0
https://github.com/mongodb/mongo/commit/117146adb644c0658a8a2fd209bfab49991d2668

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