[JAVA-1802] Improve runCommand API documentation Created: 06/May/15  Updated: 07/Oct/15  Resolved: 07/Sep/15

Status: Closed
Project: Java Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 3.1.0

Type: Improvement Priority: Minor - P4
Reporter: Ross Lawley Assignee: Ross Lawley
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-1801 impossible to get profile status from... Closed

 Description   

Clarify the intent and read preference used by the MongoCollection.runCommand methods.

Where the commands are run are based on if a read preference is supplied:

method read preference use case
runCommand(Bson command) primary run write commands.
eg. create index, create collection, drop collection etc..
runCommand(Bson command, ReadPreference readPreference) as supplied run any commands with the supplied readPreference.
eg dbstats, profile, ismaster etc..

Add examples to the quick-tour-admin.md, needs to be done in async also.



 Comments   
Comment by Jeffrey Yemin [ 07/Oct/15 ]

Released in 3.1.0

Comment by Ross Lawley [ 07/Sep/15 ]

The work for clarifying and the API docs was done in JAVA-1867.

Now the supplied readPreference is used and "write" commands can use either method with the `primary` read preference.

Comment by Jeffrey Yemin [ 22/Jun/15 ]

There is actually a bug related to this (JAVA-1867), the fix for which contains a partial fix for this issue.

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