[SERVER-7541] mongos should be able to read from secondaries when there is no master Created: 02/Nov/12  Updated: 08/Mar/13  Resolved: 23/Feb/13

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

Type: Improvement Priority: Major - P3
Reporter: Jenna deBoisblanc Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

2.2.0


Attachments: File replica_set_no_connect.js    
Issue Links:
Duplicate
duplicates SERVER-6664 mongos won't create a new connection ... Closed
duplicates SERVER-7246 Mongos cannot do slaveOk queries when... Closed
Related
is related to SERVER-2478 can't start usable mongos if replSet ... Closed
Participants:

 Description   

2 node replica set in shard s2. Take down the primary so there's no longer a majority. It's possible to connect to the remaining node and do slaveOk() reads. It is not possible, however, to read from the secondary using mongos, even when you set read preference to "secondary":

mongos> db.nov1.find().readPref("secondary")
error: {
   "$err" : "socket exception [CONNECT_ERROR] for s2/localhost:47017,localhost:47018",
   "code" : 11002
}

This is related, but think overall a different issue than the startup problem.



 Comments   
Comment by Greg Studer [ 23/Feb/13 ]

test case repros, 2.2 and master

Comment by Eliot Horowitz (Inactive) [ 27/Dec/12 ]

SERVER-6664

Comment by Scott Hernandez (Inactive) [ 02/Nov/12 ]

Please provide a test case to reproduce this. The jstests/sharding/read_pref.js is a good starting point if that helps.

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