-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
-
(copied to CRM)
We do not support the count option in the $collStats aggregation stage in time series collections since they are considered views. Therefore, db.timeseries_collection.stats().count does not exist, and applications which rely on db.collection.stats().count will have an undefined behavior for time series collections. While we do support a form of count through db.timeseries_collection.stats().timeseries.numMeasurementsCommitted, this field resets to 0 whenever the server restarts and is therefore an unreliable measurement for counting the number of documents in a time series collection.
Time series collections are considered as views and do not support some $collStats options. However, since time series collections are intended to behave similarly to normal collections, we should support some $collStats options which are not supported in views.