createIndexes won't be limited by maxNumActiveUserIndexBuilds

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 6.0.15
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • Hide
      mgset-2021316516 [direct: primary] admin> db.adminCommand({ getParameter: 1, maxNumActiveUserIndexBuilds: 1 })
      {
        maxNumActiveUserIndexBuilds: 1,
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1773997977, i: 1 }),
          signature: {
            hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
            keyId: Long("0")
          }
        },
        operationTime: Timestamp({ t: 1773997977, i: 1 })
      }
      mgset-2021316516 [direct: primary] admin> use test_db
      switched to db test_db
      mgset-2021316516 [direct: primary] test_db> let docs = [];mgset-2021316516 [direct: primary] test_db> for (let i = 0; i < 1000; i++) {
      ...     docs.push({ x: i, y: i * 2, z: i * 3 });
      ... }
      1000
      mgset-2021316516 [direct: primary] test_db> db.test_collection.insertMany(docs); 
      mgset-2021316516 [direct: primary] test_db> db.runCommand({createIndexes: "test_collection", indexes: [{key: {x: -1}, name: "x"}, {key: {y: -1}, name: "y"}, {key: {z: -1}, name: "z"}]})
      {
        numIndexesBefore: 1,
        numIndexesAfter: 4,
        createdCollectionAutomatically: false,
        commitQuorum: 'votingMembers',
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1773998244, i: 7 }),
          signature: {
            hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
            keyId: Long("0")
          }
        },
        operationTime: Timestamp({ t: 1773998244, i: 7 })
      }
      Show
      mgset-2021316516 [direct: primary] admin> db.adminCommand({ getParameter: 1, maxNumActiveUserIndexBuilds: 1 }) {   maxNumActiveUserIndexBuilds: 1,   ok: 1,   '$clusterTime' : {     clusterTime: Timestamp({ t: 1773997977, i: 1 }),     signature: {       hash: Binary(Buffer.from( "0000000000000000000000000000000000000000" , "hex" ), 0),       keyId: Long ( "0" )     }   },   operationTime: Timestamp({ t: 1773997977, i: 1 }) } mgset-2021316516 [direct: primary] admin> use test_db switched to db test_db mgset-2021316516 [direct: primary] test_db> let docs = [];mgset-2021316516 [direct: primary] test_db> for (let i = 0; i < 1000; i++) { ...     docs.push({ x: i, y: i * 2, z: i * 3 }); ... } 1000 mgset-2021316516 [direct: primary] test_db> db.test_collection.insertMany(docs); mgset-2021316516 [direct: primary] test_db> db.runCommand({createIndexes: "test_collection" , indexes: [{key: {x: -1}, name: "x" }, {key: {y: -1}, name: "y" }, {key: {z: -1}, name: "z" }]}) {   numIndexesBefore: 1,   numIndexesAfter: 4,   createdCollectionAutomatically: false ,   commitQuorum: 'votingMembers' ,   ok: 1,   '$clusterTime' : {     clusterTime: Timestamp({ t: 1773998244, i: 7 }),     signature: {       hash: Binary(Buffer.from( "0000000000000000000000000000000000000000" , "hex" ), 0),       keyId: Long ( "0" )     }   },   operationTime: Timestamp({ t: 1773998244, i: 7 }) }
    • 2
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      If we create multiple indexes concurrently via `createIndexes` command, then it won't be limited by maxNumActiveUserIndexBuilds, these indexes will be creating in the same time. When there are no enough memory in mongod, this behavior may trigger the process OOM.

            Assignee:
            Unassigned
            Reporter:
            Jiquan Long
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: