Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68353

Support count option in $collStats for time series collections

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution

      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.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            edwin.zhou@mongodb.com Edwin Zhou
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: