|
SERVER-52559 needs to make this lock lock-free, but the db.system.views collection lock is currently taken to avoid cycles in view definition resolution: i.e. allowing views to continue to be created or modified during aggregation pipeline view definition resolution can lead to an endless cycle.
A way to resolve SERVER-52559's issue is to make the ViewCatalog copy-on-write. Lock-free reads already fetch shared_ptr<ViewCatalog> in order to avoid the ViewCatalog destructing during lock-free operation. This change would make the ViewCatalog immutable for lock-free reads.
|