We are going to run atlas proxy with mongodb 4.9+ version in the future. While trying to run the test harness with a new mongod in dev, I found a breaking change. We have this test in the test suite:
log("Index all paths that includes _id"); db.test5.insert({name: "foo", type: "bar", v: 1, _id: {a: 1, b: 2}}); db.test5.createIndex({"$**": 1},{wildcardProjection: {name: 0, type: 0, _id: 1}}); assert.eq("IXSCAN", db.test5.find({"_id.a": 1}).explain(true).queryPlanner.winningPlan.inputStage.stage); assert.eq("COLLSCAN", db.test5.find({"name": "foo"}).explain(true).queryPlanner.winningPlan.stage);
which started failing with this error: `TypeError: db.test5.find(...).explain(...).queryPlanner.winningPlan.inputStage is undefined`
We have similar tests that pass without a hitch, for example:
log("Index all with excluded subtrees"); db.test4.insert({name: "foo", type: "bar", v: 1}); db.test4.createIndex({"$**": 1},{wildcardProjection: {name: 0, type: 0}}); assert.eq("IXSCAN", db.test4.find({"v": 1}).explain(true).queryPlanner.winningPlan.inputStage.stage); assert.eq("COLLSCAN", db.test4.find({"name": "foo"}).explain(true).queryPlanner.winningPlan.stage); db.test4.drop();
- is caused by
-
SERVER-25023 no way to index the same fields with two different partial index filters
- Closed