[SERVER-12972] DBClientReplicaSet should ignore value of "inline" field of MapReduce commands Created: 28/Feb/14  Updated: 07/Dec/16  Resolved: 16/Sep/15

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.6.0-rc0
Fix Version/s: 3.1.9

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform 9 (09/18/15)
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 16/Sep/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-12972: DBClientReplicaSet should ignore value of inline field of MapReduce commands
Branch: master
https://github.com/mongodb/mongo/commit/7db3d366efc6c683ba3999f44fe73c79eeb33b84

Comment by Mathias Stearn [ 10/Mar/14 ]

Passing to tyler@10gen.com since this is more his domain now.

Generated at Thu Feb 08 03:30:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.