[SERVER-56511] use AutoGetOrCreateCollection to create system.views in _createCollection() Created: 30/Apr/21  Updated: 25/Jul/23  Resolved: 25/Jul/23

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

Type: Improvement Priority: Minor - P4
Reporter: Benety Goh Assignee: [DO NOT USE] Backlog - Storage Execution EMEA
Resolution: Won't Do Votes: 0
Labels: read-only-views, techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-56512 use AutoGetOrCreateCollection to crea... Closed
Related
is related to SERVER-37283 View graph cycle on expressive lookup... Closed
is related to SERVER-53256 Make a new lock helper to encapsulate... Backlog
is related to SERVER-47123 Remove AutoGetOrCreateDb Closed
Assigned Teams:
Storage Execution EMEA
Participants:

 Description   

The _createCollection() uassert mentioned in the description for SERVER-47123 was introduced in SERVER-37283.

Going by the comment above the assertion, we may be able to tell if the collection lock acquisition is requested by UUID or by namespace from the nsOrUUID argument.

For _createCollection(), we can probably convert to a combination of AutoGetDb and CollectionLock for now and defer the work on refining the assertion condition in AutoGetCollection.

Alternative, we could upgrade the lock mode (using this helper function) for system.views to MODE_X in _createCollection().


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