Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7799

Use document_count from collection stats in the Aggregations input documents' total

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.43.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools
    • 3
    • Not Needed
    • Iteration Asteroid

      In the Aggregations input documents we get the estimatedCount. This is just an estimate of the number of documents in the collection. In the Documents tab for the badge we use the document count from the collection stats. Both are just estimates of the number of documents in a collection and both can be null which we handle.

       

      estimatedCount is not fast for timeseries collections and it triggers a colscan so we have a maxTimeMS. But for large timeseries collections this will therefore always start a colscan and then time out. So you would end up with null. So we might as well just use the collection stats like for the Documents tab which should spare us that query

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: