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

'dropDup' typo in IndexCatalog::_fixIndexSpec

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.6
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Labels:
    • Fully Compatible
    • ALL
    • Hide
      var t = db.dropdups;
      t.drop();
      
      t.ensureIndex({a: 1}, {dropDups: true});
      t.getIndexSpecs().forEach(function(spec) {
          assert.eq(false, spec.hasOwnProperty('dropDups'), tojson(spec));
      });
      
      Show
      var t = db.dropdups; t.drop(); t.ensureIndex({a: 1}, {dropDups: true}); t.getIndexSpecs().forEach(function(spec) { assert.eq(false, spec.hasOwnProperty('dropDups'), tojson(spec)); });

      IndexCatalog::_fixIndexSpec has this code:

      1119    else if ( s == "dropDup" ) {
      1120        // dropDups is silently ignored and removed from the spec as of SERVER-14710.
      1121    }
      

      I believe "dropDup" should be "dropDups".


      Version: 10827279fbc6380d4d7774837022b65b3204a988

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: