Details
-
Improvement
-
Resolution: Won't Do
-
Major - P3
-
None
-
None
-
None
-
Storage Execution
Description
In SERVER-24766, AutoGetCollectionOrViewForRead has a method that relinquishes its locks. This is required to maintain correct statistics: simply destroying the AutoGetCollectionOrViewForRead would cause CurOp to log only the time resolving the view and not include the time actually performing the aggregation on the backing namespace.
This unlock method is not in the spirit of RAII and we should investigate whether or not it would be possible to relinquish the database lock in the constructor of AutoGetCollectionOrViewForRead instead if the namespace is a view and not a collection.