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

Bulk delete of large collections times out and shows error

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.44.6
    • Component/s: None
    • Environment:
      OS: macOS 14.7.1
      node.js / npm versions: 1.44.6
      Additional info:
      connected to the Atlas cluster
    • Developer Tools

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?

      For large collection (13M documents in my case) the bulk delete operation shows an error in the GUI, however it correctly deletes the documents in the collection "in the background" (but it takes 20-30 minutes).

      Please be sure to attach relevant logs with any sensitive data redacted.
      How to retrieve logs for: Compass; Shell

      Compass log:

      Unknown macro: {"t"}

      ,"s":"D1","c":"COMPASS-DATA-SERVICE","id":1001000022,"ctx":"Connection 0","msg":"Server heartbeat succeeded","attr":{"connectionId”:”*******:27017","duration":64}}

      Unknown macro: {"t"}

      ,"s":"D1","c":"COMPASS-DATA-SERVICE","id":1001000030,"ctx":"Connection 0","msg":"Driver command failed","attr":{"address":"*******:27017","serverConnectionId":11,"duration":300010,"commandName":"delete","failure":"connection 11 to *******:27017 timed out"}}

      Unknown macro: {"t"}

      ,"s":"E","c":"COMPASS-DATA-SERVICE","id":1001000058,"ctx":"Connection 0","msg":"Failed to perform data service operation","attr":{"op":"deleteMany","message":{},"ns":"*******"}}

      Unknown macro: {"t"}

      ,"s":"E","c":"COMPASS-CRUD-UI","id":1001000268,"ctx":"Bulk Delete Documents","msg":"Delete operation failed: connection 11 to *******:27017 timed out","attr":{"stack":"MongoNetworkTimeoutError: connection 11 to *******:27017 timed out\n    at Timeout._onTimeout (file:///Applications/MongoDB%20Compass.app/Contents/Resources/app.asar/build/457.62ff507227e440b5b770.renderer.js:134:641388)\n    at listOnTimeout (node:internal/timers:581:17)\n    at process.processTimers (node:internal/timers:519:7)","name":"MongoNetworkTimeoutError","message":"connection 11 to *******:27017 timed out","code":null}}

       

       

      Steps to Reproduce

      How could an engineer replicate the issue you’re reporting?

      Create an M30 cluster on MongoDB Atlas (2 secondary, 1 primary replica set) with a few collections that have over 13M documents. Try bulk deleting documents in one of the collections from the Compass GUI.

      Expected Results

      I receive an information/warning that the collection size is above XYZ (your tested size that doesn't timeout) and the delete operation will happen in the background.

      Actual Results

      What do you observe is happening?

      I receive the error "The delete operation failed." which is not true, because the delete operation continues in the background and eventually finishes.

      Additional Notes

      Any additional information that may be useful to include.

      Tested on collections with 13M and 82M documents on the MongoDB Atlas M30-M40 cluster.

        1. Screenshot 2024-11-19 at 16.29.54.png
          343 kB
          Szymon Kurdziel
        2. Screenshot 2024-11-19 at 2.19.58 PM.png
          73 kB
          Niva Sivakumar
        3. Screenshot 2024-11-19 at 2.23.57 PM.png
          227 kB
          Niva Sivakumar
        4. Screenshot 2024-11-19 at 2.26.48 PM.png
          232 kB
          Niva Sivakumar
        5. Screenshot 2024-11-19 at 2.26.56 PM.png
          386 kB
          Niva Sivakumar

            Assignee:
            Unassigned Unassigned
            Reporter:
            szymon.kurdziel@contractors.roche.com Szymon Kurdziel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: