-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: 2.6.0-rc0
-
Component/s: Internal Client
-
None
-
Fully Compatible
-
ALL
-
Platform 9 (09/18/15)
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
The server reacts to the presence of an "inline" field and ignores its value. This means that even {inline:false} is treated as an inline MapReduce. The C++ driver should use the same rules.
Original description:
Noticed this in 2.6.0-rc0's source, but the code probably goes back much further. I'm not sure if this affects sharding, since it may just respect the driver's read preference – but I assume DBClientReplicaSet is the C++ driver.
The C++ driver (or whatever DBClient is) expects a truthy value: https://github.com/mongodb/mongo/blob/3779bf419438d2625277cf3c1c7216c497f683a8/src/mongo/client/dbclient_rs.cpp#L256
...but the MR execution code only cares that it's a key: https://github.com/mongodb/mongo/blob/3779bf419438d2625277cf3c1c7216c497f683a8/src/mongo/db/commands/mr_common.cpp#L72
For context, see: https://github.com/mongodb/mongo-php-driver/pull/598#discussion_r10183536
We only document {inline: 1} in http://docs.mongodb.org/manual/reference/command/mapReduce/#output-inline, but technically, only the key is relevant.