server downgrade doesn't handle new index version

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.8.3
    • Affects Version/s: 1.9.1
    • Component/s: Index Maintenance
    • None
    • Environment:
      Tested on Vista 64
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The docs and qa bug indicate that a downgrade should fail, or that at least operations against a newer index format should fail:
      http://www.mongodb.org/display/DOCS/Index+Versions#IndexVersions-RollingBacktoMongoDB%3Cv2.0

      Create a collection with an index on it and verify new index version format:

      db = db.getSisterDB("qadb");

      db.idx1.drop();
      db.idx1.save(

      {a:1, b:1}

      );
      db.idx1.ensureIndex(

      {a:1, b:1}

      );

      var idxlist = db.idx1.getIndexes();
      idxlist;
      // note v:1 indexes

      downloaded 1.8.2. start it on the same database files. mongod starts up normally.
      I issued some queries, the last of which should use the index. Note that query does not return an error as specified in the docs, but it also doesn't return the correct result:

      > use qadb
      switched to db qadb
      > db.idx1.find();

      { "_id" : ObjectId("4e445314fb3e65e39a74d26c"), "a" : 1, "b" : 1 }

      > db.idx1.find(

      {b:1}

      );

      { "_id" : ObjectId("4e445314fb3e65e39a74d26c"), "a" : 1, "b" : 1 }

      > db.idx1.find(

      {a:1}

      );
      > db.idx1.getIndexes();
      [
      {
      "v" : 1,
      "key" :

      { "_id" : 1 }

      ,
      "ns" : "qadb.idx1",
      "name" : "id"
      },
      {
      "v" : 1,
      "key" :

      { "a" : 1, "b" : 1 }

      ,
      "ns" : "qadb.idx1",
      "name" : "a_1_b_1"
      }
      ]
      >

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Chris Westin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: