MongoServerError: Failed to acquire DDL lock for namespace 'sustaindb' after 300000 ms that is currently locked with reason 'dropCollection_V2'

Hi Renato,

Thanks for the response.

  • All three data nodes for shard1rs are up running. At least, all three nodes have an active mongod process.
  • There are three data nodes in the replica set. I am not using an arbiter.

I get an error when trying to use rs.status() in mongosh. Below is the output of sh.status().

[direct: mongos] admin> sh.status()
shardingVersion
{ _id: 1, clusterId: ObjectId("6517a9c3513b5e1ea5598afb") }
---
shards
[
  {
    _id: 'shard1rs',
    host: 'shard1rs/lattice-151:27017,lattice-152:27017,lattice-153:27017',
    state: 1,
    topologyTime: Timestamp({ t: 1696049773, i: 2 })
  },
  {
    _id: 'shard2rs',
    host: 'shard2rs/lattice-154:27017,lattice-155:27017,lattice-156:27017',
    state: 1,
    topologyTime: Timestamp({ t: 1696049917, i: 1 })
  },
  {
    _id: 'shard3rs',
    host: 'shard3rs/lattice-157:27017,lattice-158:27017,lattice-159:27017',
    state: 1,
    topologyTime: Timestamp({ t: 1696049999, i: 5 })
  },
  {
    _id: 'shard4rs',
    host: 'shard4rs/lattice-160:27017,lattice-161:27017,lattice-162:27017',
    state: 1,
    topologyTime: Timestamp({ t: 1696050169, i: 5 })
  },
  {
    _id: 'shard5rs',
    host: 'shard5rs/lattice-163:27017,lattice-164:27017,lattice-165:27017',
    state: 1,
    topologyTime: Timestamp({ t: 1718904344, i: 6 })
  }
]
---
active mongoses
[ { '7.0.1': 60 } ]
---
autosplit
{ 'Currently enabled': 'yes' }
---
balancer
{ 'Currently enabled': 'yes', 'Currently running': 'no' }
---
databases
[
  {
    database: {
      _id: 'auth_test',
      primary: 'shard2rs',
      partitioned: false,
      version: {
        uuid: new UUID("feacc160-f91b-4564-a993-0788334bb858"),
        timestamp: Timestamp({ t: 1696482050, i: 7 }),
        lastMod: 1
      }
    },
    collections: {}
  },
  {
    database: {
      _id: 'census_ppmf',
      primary: 'shard1rs',
      partitioned: false,
      version: {
        uuid: new UUID("48b6c178-148d-48da-8579-58d447d35146"),
        timestamp: Timestamp({ t: 1718647921, i: 7 }),
        lastMod: 1
      }
    },
    collections: {}
  },
  {
    database: { _id: 'config', primary: 'config', partitioned: true },
    collections: {
      'config.system.sessions': {
        shardKey: { _id: 1 },
        unique: false,
        balancing: true,
        chunkMetadata: [
          { shard: 'shard1rs', nChunks: 1 },
          { shard: 'shard2rs', nChunks: 222 },
          { shard: 'shard3rs', nChunks: 98 },
          { shard: 'shard4rs', nChunks: 98 },
          { shard: 'shard5rs', nChunks: 255 }
        ],
        chunks: [
          'too many chunks to print, use verbose if you want to force print'
        ],
        tags: []
      }
    }
  },
  {
    database: {
      _id: 'devdb',
      primary: 'shard3rs',
      partitioned: false,
      version: {
        uuid: new UUID("39e6e499-c80a-410b-ac77-712fa9d29f03"),
        timestamp: Timestamp({ t: 1697219035, i: 1 }),
        lastMod: 1
      }
    },
    collections: {}
  },
  {
    database: {
      _id: 'MMM_FFAR',
      primary: 'shard5rs',
      partitioned: false,
      version: {
        uuid: new UUID("e452ef90-0cb3-4971-a552-f4ecc2359c7e"),
        timestamp: Timestamp({ t: 1719426193, i: 1 }),
        lastMod: 1
      }
    },
    collections: {}
  },
  {
    database: {
      _id: 'scsc_data',
      primary: 'shard2rs',
      partitioned: false,
      version: {
        uuid: new UUID("093c96e1-4a2e-4a94-8c09-52268cfe8248"),
        timestamp: Timestamp({ t: 1696728208, i: 1 }),
        lastMod: 1
      }
    },
    collections: {}
  },
  {
    database: {
      _id: 'sustaindb',
      primary: 'shard4rs',
      partitioned: false,
      version: {
        uuid: new UUID("c66eb0cc-aa7e-4d63-9cee-ef89c657075f"),
        timestamp: Timestamp({ t: 1696050410, i: 5 }),
        lastMod: 1
      }
    },
    collections: {
      'sustaindb.tract_centroid_geo_old': {
        shardKey: { _id: 1 },
        unique: false,
        balancing: true,
        chunkMetadata: [ { shard: 'shard4rs', nChunks: 1 } ],
        chunks: [
          { min: { _id: MinKey() }, max: { _id: MaxKey() }, 'on shard': 'shard4rs', 'last modified': Timestamp({ t: 1, i: 1 }) }
        ],
        tags: []
      }
    }
  },
  {
    database: {
      _id: 'test',
      primary: 'shard1rs',
      partitioned: false,
      version: {
        uuid: new UUID("0465ba40-a547-43a1-af96-4ebde10f4394"),
        timestamp: Timestamp({ t: 1708580643, i: 2 }),
        lastMod: 1
      }
    },
    collections: {}
  },
  {
    database: {
      _id: 'user',
      primary: 'shard3rs',
      partitioned: false,
      version: {
        uuid: new UUID("8d403324-f7a3-4baf-925a-be8b6391551a"),
        timestamp: Timestamp({ t: 1696725450, i: 5 }),
        lastMod: 1
      }
    },
    collections: {}
  }
]