Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8595

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 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

    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.

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            sam.helman@10gen.com sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: