[SERVER-6983] The shell should support ReadPreferences and WriteConcerns similarly to drivers Created: 09/Sep/12  Updated: 08/Apr/19  Resolved: 08/Apr/19

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Richard Kreuter (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-9281 Add setReadPref() JS method to databa... Closed
Related
related to SERVER-6935 shell cursor help should include read... Closed
related to SERVER-4464 drivers and mongos should support 5 r... Closed
is related to SERVER-6964 Add WriteConcern object to shell, and... Closed
Participants:

 Description   

Looks like the shell doesn't have any support for WriteConcerns, and limited support for ReadPreferences (there's a readPref() method on the cursor). Especially for demos, tutorials, and trainings, it would be nice if the shell supported functionality analogous to what we aim for in the drivers, to wit:

  • setting a default read preference on the collection, database, or connection;
  • setting a default write concern on the collection, database, or connection;
  • overriding a defaulted write concern during insert, update, remove.

I don't know what I would want the exact semantics to be, but the main thing would be to be able to show people the basic patterns we mean for them to use in real programs.

Doc changes needed: whatever interfaces people come up with ought to get documented.



 Comments   
Comment by Mira Carey [ 08/Apr/19 ]

I believe the shell to have all the functionality of the drivers nowadays, although perhaps not the exact same api.

As such, I'm closing this as gone away

Comment by Richard Kreuter (Inactive) [ 09/Sep/12 ]

This issue duplicates that issue (oops), but not vice versa (so maybe not oops).

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