Against a corrupted data set (next extent header pointing to invalid location):
> db.test.ensureIndex({a:1}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 1, "numIndexesAfter" : 1, "ok" : 1 } > db.test.ensureIndex({b:1}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 1, "numIndexesAfter" : 1, "ok" : 1 } >
Seems like ok should not be set to 1 here