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

drop collection / database hang on sharded cluster

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.0
    • Component/s: None
    • None
    • ALL
    • Hide
      • create a sharded cluster
      • connect to the mongos with mongo or mongosh
      • create a new collection
      • drop the collection

       

      [direct: mongos] admin> use test
      switched to db test
      [direct: mongos] test> db.createCollection("new", {})
      { ok: 1 }
      [direct: mongos] test> db.new.drop()
         -> hangs indefinitely
      

       

      Show
      create a sharded cluster connect to the mongos with mongo or mongosh create a new collection drop the collection   [direct: mongos] admin> use test switched to db test [direct: mongos] test> db.createCollection( " new " , {}) { ok: 1 } [direct: mongos] test> db. new .drop() -> hangs indefinitely  

      Since mongodb 5.0.0, on a sharded cluster with 3 config server, 2 shards and 1 mongos, dropping a collection or a database hang indefinitely without succeding

      On Ubuntu 20.04

      [direct: mongos] admin> sh.status()
      shardingVersion
      {
        _id: 1,
        minCompatibleVersion: 5,
        currentVersion: 6,
        clusterId: ObjectId("60f7e17702142e807fc3033d")
      }
      ---
      shards
      [
        {
          _id: 'shard0000',
          host: 'localhost:27021',
          state: 1,
          topologyTime: Timestamp(2, 1626857864)
        },
        {
          _id: 'shard0001',
          host: 'localhost:27022',
          state: 1,
          topologyTime: Timestamp(2, 1626857876)
        }
      ]
      ---
      active mongoses
      [ { '5.0.0': 1 } ]
      ---
      autosplit
      { 'Currently enabled': 'yes' }
      ---
      balancer
      {
        'Currently running': 'no',
        'Currently enabled': 'yes',
        'Failed balancer rounds in last 5 attempts': 0,
        'Migration Results for the last 24 hours': { '342': "Failed with error 'aborted', from shard0000 to shard0001" }
      }
      ---
      databases
      [
        {
          database: { _id: 'config', primary: 'config', partitioned: true },
          collections: {
            'config.system.sessions': {
              shardKey: { _id: 1 },
              unique: false,
              balancing: true,
              chunkMetadata: [ { shard: 'shard0000', nChunks: 1024 } ],
              chunks: [
                'too many chunks to print, use verbose if you want to force print'
              ],
              tags: []
            }
          }
        }
      ]

       

       

            Assignee:
            edwin.zhou@mongodb.com Edwin Zhou
            Reporter:
            felix2626 adrien petel
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: