Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1949

ShardAndDistributeCollection() helper should remove setting numInitialChunks

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools

      shardAndDistributeCollection sets numInitialChunks: 1000 but server recently implemented SERVER-92762 which has been backported to 6.0, 7.0 and 8.0. It sets the default value of numInitialChunks to 90. So, we don't need to set it to a 1000 in this shell helper anymore.

      sh.shardAndDistributeCollection = function(ns, key, unique, options) {
          sh.shardCollection(ns, key, unique, options);
          sh.reshardCollection(ns, key, { numInitialChunks: 1000, forceRedistribution: true });
      } 
      

            Assignee:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Reporter:
            ratika.gandhi@mongodb.com Ratika Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: