[SERVER-51319] Check DatabaseShardingState::checkDbVersion after acquiring a storage snapshot for AutoGetCollection*LFR Created: 02/Oct/20  Updated: 29/Oct/23  Resolved: 16/Dec/20

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

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

Issue Links:
Depends
depends on SERVER-50678 Implement lock-free version of AutoGe... Closed
depends on SERVER-51274 Write up and prove design solution ra... Closed
Problem/Incident
causes SERVER-62457 Lock-free reads causes query subsyste... Closed
causes SERVER-52626 Remove incompatible_with_lockfreeread... Closed
Related
is related to SERVER-53257 Determine whether we need const Colle... Closed
is related to SERVER-53392 Determine what longer term sharding c... Closed
is related to SERVER-54402 CollectionShardingState and DatabaseS... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-11-16, Execution Team 2020-11-30, Execution Team 2020-12-14, Execution Team 2020-12-28
Participants:

 Description   

DatabaseShardingState::checkDbVersion is normally called in DBLock, which AutoGetCollectionLFR will not use. I think we'll want to perform the check after setting up consistent catalog state (opening a storage snapshot), but need to prove it first in SERVER-51274

Also remove the dassert lock checks in DatabaseShardingState::get() and CollectionShardingState::get() in this task.



 Comments   
Comment by Githook User [ 16/Dec/20 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-51319 Call DatabaseShardingState::checkDbVersion() and CSS::getCollectionDescription() safely in AutoGetCollectionLockFree and expand lock-free sharding testing.

CollectionShardingState and DatabaseShardingState can now be accessed without a lock via new
getSharedForLockFreeReads() functions on their respective interfaces.

The shard key will now be available in the AutoGetCollection* RAII types via the CollectionPtr. This
allows lock-free reads to acquire a single view of the sharding state to use throughout a read
operation.
Branch: master
https://github.com/mongodb/mongo/commit/0efb63b64441f935b5d06f4180d0969434327551

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