indexStats() function works on secondaries without suitable read preference set

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.4.0-rc0
    • None
    • Replication
    • ALL
    • Hide

      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

      Show
      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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: