-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.9.1
-
Component/s: Index Maintenance
-
None
-
Environment:Tested on Vista 64
-
ALL
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(
);
db.idx1.ensureIndex(
);
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();
> db.idx1.find(
{b:1});
{ "_id" : ObjectId("4e445314fb3e65e39a74d26c"), "a" : 1, "b" : 1 }> db.idx1.find(
{a:1});
> db.idx1.getIndexes();
[
{
"v" : 1,
"key" :
,
"ns" : "qadb.idx1",
"name" : "id"
},
{
"v" : 1,
"key" :
,
"ns" : "qadb.idx1",
"name" : "a_1_b_1"
}
]
>