-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, if a read or write is performed on `SizeCountStore` or `SizeCountTimestampStore` when the collection doesn't exist, a C++ error is thrown because we've attempted to access an uninitialized object.
From SERVER-123843:
In SERVER-121777, we relaxed the constraint that the replicated size count store exists before calling SizeCountStore::read() and that the replicated size count timestamp store exists before calling SizeCountTimestampStore::read(), instead returning boost::none if the respective store was not found. The motivation for this change was that during initial sync, some phases check CollectionImpl::dataSize() before we have cloned the replicated size count stores. For example, the CollectionCloning phase involves calling cappedDeleteUntilBelowConfiguredMaximum(). The issue with this relaxed constraint is that most of the time (e.g., steady state), the size count store should exist, and the absence of the size count stores is a bug that should result in some kind of assertion error.
In this ticket, investigate if we can assert that the stores exist most of the time, permitting their absence only during initial sync.
Note that initial sync is only relevant on ASC, not DSC, and thus we should be able to assert the stores always exist on DSC (afaik).
- is related to
-
SERVER-121777 Integrate persisted size/count into Collection API
-
- In Progress
-