[SERVER-27346] maxStalenessSeconds doesn't appear in cursor.readPref() Created: 08/Dec/16  Updated: 06/Dec/22  Resolved: 14/Jan/22

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

Type: Bug Priority: Major - P3
Reporter: Allison Reinheimer Moore Assignee: [DO NOT USE] Backlog - Sharding NYC
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-8723 3.4: add maxStalenessSeconds to read ... Closed
Assigned Teams:
Sharding NYC
Operating System: ALL
Steps To Reproduce:

mongos> db.foo.insert({"name":"foo"})
WriteResult({ "nInserted" : 1 })
mongos> db.foo.find().readPref
function (mode, tagSet) {
    var readPrefObj = {mode: mode};
 
    if (tagSet) {
        readPrefObj.tags = tagSet;
    }
 
    return this._addSpecial("$readPreference", readPrefObj);
}

Sprint: Sharding 2017-01-02
Participants:

 Description   

maxStalenessSeconds isn't showing up in the cursor.readPref method implementation. I was under the impression that maxStalenessSeconds should also be applicable for the readPref method though I may of course be mistaken.

I noticed this while documenting maxStalenessSeconds.



 Comments   
Comment by Ratika Gandhi [ 14/Jan/22 ]

We've deprecated the mongo shell in favor of the new mongosh. Unfortunately, we aren't able to pursue improvements to the deprecated shell except in extreme cases, such as critical security fixes. Please start making use of mongosh and let us know if it works for you in this case.

Comment by Misha Tyulenev [ 09/Dec/16 ]

maxStalenessSeconds are part of the readPreference but it was not added to the cursor. readPref function.

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