[SERVER-78505] Database cache does not use the 'allowLocks' option correctly Created: 28/Jun/23  Updated: 29/Oct/23  Resolved: 26/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.1.0-rc0, 5.0.19, 6.0.8, 7.0.0-rc8
Fix Version/s: 7.1.0-rc0, 6.0.10, 7.0.2, 5.0.22

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Allison Easton
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-78115 Shard primaries must commit a majorit... Closed
Problem/Incident
causes SERVER-80234 Catalog cache unit tests of allowLock... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Sharding EMEA 2023-07-10, Sharding EMEA 2023-07-24, Sharding EMEA 2023-08-07
Participants:

 Description   

The ShardingWriteRouter uses an option called 'allowLocks' during catalog cache refreshes which, when true, causes the refresh to exit rather than blocking if the refresh cannot be fulfilled with local information. However, though the allowLocks setting is sent to the getDatabase call and checked as part of the tassert, there is no early exit in place for the database section.

This means that the onInserts observer that uses the ShardingWriteRouter can end up blocking behind a catalog cache refresh.

This problem is also blocking the fix for SERVER-78115. This ticket is adding a majority write back into the SSCCL, and in the case that the ShardingWriteRouter triggers an DB refresh, the majority write ends up blocked because the onInserts is keeping an oplog hole open.



 Comments   
Comment by Githook User [ 19/Sep/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-78505 Database cache does not use the 'allowLocks' option correctly

(cherry picked from commit 00361bb6f7a801ac264e751e401c669cf3b6b222)

SERVER-80234 Catalog cache unit tests of allowLocks should block the refresh

(cherry picked from commit 49fc629f216aae4b8c60176c7bf3386bb2e7ed15)
Branch: v5.0
https://github.com/mongodb/mongo/commit/763d869d45923d438ccf9780d7c6345f567fdd91

Comment by Githook User [ 01/Sep/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-78505 Database cache does not use the 'allowLocks' option correctly

(cherry picked from commit 00361bb6f7a801ac264e751e401c669cf3b6b222)
Branch: v6.0
https://github.com/mongodb/mongo/commit/c898aa26261604d1648c56f5cb62d9b5b7f28c9f

Comment by Githook User [ 25/Aug/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-78505 Database cache does not use the 'allowLocks' option correctly

(cherry picked from commit 00361bb6f7a801ac264e751e401c669cf3b6b222)

SERVER-80234 Catalog cache unit tests of allowLocks should block the refresh

(cherry picked from commit 49fc629f216aae4b8c60176c7bf3386bb2e7ed15)
Branch: v7.0
https://github.com/mongodb/mongo/commit/a2ed5d6e831118e11f9cd60bc00cd6a1bcad4380

Comment by Githook User [ 26/Jul/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-78505 Database cache does not use the 'allowLocks' option correctly
Branch: master
https://github.com/mongodb/mongo/commit/00361bb6f7a801ac264e751e401c669cf3b6b222

Generated at Thu Feb 08 06:38:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.