[JAVA-404] Allow inline M/R w/SlaveOk go to secondaries Created: 29/Jul/11  Updated: 25/Jun/13  Resolved: 24/Oct/11

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: 2.7

Type: Improvement Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to JAVA-364 MapReduceOutput sometimes returns emp... Closed
Backwards Compatibility: Major Change

 Description   

Send secondaries map/reduce request if they are Inline and SlaveOk



 Comments   
Comment by auto [ 22/Oct/11 ]

Author:

{u'login': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: JAVA-404: slaveOk support for inline mapreduce (routes to secondaries); changed CommandResult to include serverUsed, made readPref-Secondary set slaveOk query flag, toString/toJSON on Node/ReplicaSetStatus.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/9573f647b09312ca4794195b1928478819e76658

Comment by Brendan W. McAdams [ 19/Oct/11 ]

This should be much easier now, since we can pass ReadPreference to each op. Should be easily fixable for 2.8 or 2.7.1

Comment by Scott Hernandez (Inactive) [ 29/Jul/11 ]

Like other read operations (find/cursor) we need to support specifying slaveOk at the method level. We can add the options to the MapReduceCommand (slaveOk + setOptions) for this.

Comment by Antoine Girbal [ 29/Jul/11 ]

This is the case already, in DBCollection.java:

if (command.getOutputType() == MapReduceCommand.OutputType.INLINE)
res = _db.command( cmd, getOptions() );
else
res = _db.command( cmd );

Generated at Thu Feb 08 08:52:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.