[SERVER-8595] indexStats() function works on secondaries without suitable read preference set Created: 15/Feb/13  Updated: 06/Dec/22  Resolved: 15/Aug/16

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Replication
Affects Version/s: 2.4.0-rc0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: sam.helman@10gen.com Assignee: Backlog - Replication Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Operating System: ALL
Steps To Reproduce:

Bring up a replica set
Connect directly to a secondary

use test
db.c.ensureIndex(

{ i : 1 }

)
db.c.insert(

{ i : 20 }

)
db.c.indexStats(

{ index : "i_1" }

)
// should err with "not master and slaveOk=false", does not

Participants:

 Description   

When connected directly to a secondary without any secondary-ok read preferences set, running the indexStats() function does not cause an error to be printed. Instead, the secondary runs the function as normal.


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