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

Timeseries collection selection in compass triggers 2 inefficient count operations.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.36.3
    • Affects Version/s: None
    • Component/s: Import/Export
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info: MongoDB 6,05 and compass 1.36.1
    • Iteration Yellowtail Amberjack, Iteration Zebrafish
    • Not Needed

      Description

      Time series collection count operation executes long running expensive operation(s). This is an issue for customers with high volume of data in time series collecitons. A simple selection of the collection in compass results in 2 long running expensive collection scans that impact the cluster performance and have to be stopped manually.

      Expected Results

      Single efficient scan with expiration time.

      Actual Results

      Two expensive collection scans. Example from local reproduction with MongoDB 6,05 and compass 1.36.1

      Additional Notes

      Example logs:

      {"t":{"$date":"2023-03-22T16:24:53.041+02:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn166","msg":"Slow query","attr":{"type":"command","ns":"test.TS collection","appName":"MongoDB Compass","command":{"aggregate":"TS collection","pipeline":[{"$match":{}},{"$count":"count"}],"cursor":{},"maxTimeMS":5000,"lsid":{"id":{"$uuid":"1c550366-94c4-461c-b11d-4fdab96a2c61"}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1679495075,"i":1}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"$db":"test"},"planSummary":"COLLSCAN","resolvedViews":[{"viewNamespace":"test.TS collection","dependencyChain":["TS collection","system.buckets.TS collection"],"resolvedPipeline":[{"$_internalUnpackBucket":{"timeField":"ts_time_field","metaField":"date_rolled","bucketMaxSpanSeconds":86400}}]}],"keysExamined":0,"docsExamined":99958,"cursorExhausted":true,"numYields":103,"nreturned":1,"queryHash":"17830885","queryFramework":"classic","reslen":251,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":229}},"Global":{"acquireCount":{"r":229}},"Mutex":{"acquireCount":{"r":126}}},"readConcern":{"level":"local","provenance":"implicitDefault"},"writeConcern":{"w":"majority","wtimeout":0,"provenance":"implicitDefault"},"storage":{},"remote":"127.0.0.1:53122","protocol":"op_msg","durationMillis":789}}
      
      {"t":{"$date":"2023-03-22T16:24:53.043+02:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn99","msg":"Slow query","attr":{"type":"command","ns":"test.TS collection","appName":"MongoDB Compass","command":{"count":"TS collection","lsid":{"id":{"$uuid":"282cbf44-e4b9-47fd-bf1e-052e1aa36960"}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1679495075,"i":1}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"$db":"test"},"planSummary":"COLLSCAN","resolvedViews":[{"viewNamespace":"test.TS collection","dependencyChain":["TS collection","system.buckets.TS collection"],"resolvedPipeline":[{"$_internalUnpackBucket":{"timeField":"ts_time_field","metaField":"date_rolled","bucketMaxSpanSeconds":86400}}]}],"keysExamined":0,"docsExamined":99958,"cursorExhausted":true,"numYields":104,"nreturned":1,"queryHash":"17830885","queryFramework":"classic","reslen":166,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":231}},"Global":{"acquireCount":{"r":231}},"Mutex":{"acquireCount":{"r":127}}},"readConcern":{"level":"local","provenance":"implicitDefault"},"storage":{},"remote":"127.0.0.1:52930","protocol":"op_msg","durationMillis":791}}
      

        1. m2.png
          m2.png
          43 kB
        2. m1.png
          m1.png
          62 kB

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            alena.khineika@mongodb.com Alena Khineika
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: