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

Make sure the process field is indexed in config.locks

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v5.0, v4.4
    • CAR Team 2023-12-11, CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22

      It has been observed that in a case with a large number of collections being created / dropped certain update operations on the locks collection may never be able to complete if the CSRS does not have enough capacity to execute a COLLSCAN update in under 30 seconds:

      // From v6.0.11
      {"t":{"$date":"2023-11-23T08:49:07.822Z"},"s":"I","c":"WRITE","id":51803,"ctx":"conn43450","msg":"Slow query","attr":{"type":"update","ns":"config.locks","command":{"q":{"process":"atlas-xxxxxx-shard-0"},"u":{"_set":{"state":0}},"multi":true,"upsert":false},"planSummary":"COLLSCAN","numYields":8360,"queryHash":"F919F136","planCacheKey":"4256882D","ok":0,"errMsg":"operation exceeded time limit","errName":"MaxTimeMSExpired","errCode":50,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":8361}},"FeatureCompatibilityVersion":{"acquireCount":{"w":8361}},"ReplicationStateTransition":{"acquireCount":{"w":8361}},"Global":{"acquireCount":{"w":8361}},"Database":{"acquireCount":{"w":8361}},"Collection":{"acquireCount":{"w":8361}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":8361,"timeAcquiringMicros":64969},"remote":"192.168.24.33:52636","durationMillis":30066}}
      

      Unless there is a work planned to ensure the locks collection does not get inflated, the solution is to make sure there is an index on { "process": 1 }.

            Assignee:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Reporter:
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: