-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 2.7.8
-
Component/s: Diagnostics, Sharding
-
None
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Running an explain using the $explain query option returns "invalid parameter: expected an object" when run against a sharded collection with a 2.6 shard and 2.7.8 mongos.
rassi@rassi:~/work/mongo$ ~/mongodb-linux-x86_64-2.6.5/bin/mongod --fork --logpath /dev/null about to fork child process, waiting until server is ready for connections. forked process: 5847 child process started successfully, parent exiting rassi@rassi:~/work/mongo$ ~/mongodb-linux-x86_64-2.7.8/bin/mongos --configdb=localhost:27017 --port 30000 --fork --logpath /dev/null 2014-11-10T13:29:28.120-0500 W SHARDING running with 1 config server should be done only for testing purposes and is not recommended for production about to fork child process, waiting until server is ready for connections. forked process: 5860 child process started successfully, parent exiting rassi@rassi:~/work/mongo$ ~/mongodb-linux-x86_64-2.6.5/bin/mongo --port 30000 MongoDB shell version: 2.6.5 connecting to: 127.0.0.1:30000/test Server has startup warnings: 2014-11-10T13:29:28.125-0500 I - 2014-11-10T13:29:28.125-0500 I - ** NOTE: This is a development version (2.7.8) of MongoDB. 2014-11-10T13:29:28.125-0500 I - ** Not recommended for production. 2014-11-10T13:29:28.125-0500 I - mongos> sh.addShard("localhost:27017") { "shardAdded" : "shard0000", "ok" : 1 } mongos> sh.enableSharding("test") { "ok" : 1 } mongos> sh.shardCollection("test.foo", {_id: 1}) { "collectionsharded" : "test.foo", "ok" : 1 } mongos> db.foo.find().explain() 2014-11-10T13:30:21.666-0500 error: { "$err" : "invalid parameter: expected an object ()", "code" : 10065 } at src/mongo/shell/query.js:131