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

count helper doesn't apply read preference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.2.0
    • 3.2.6, 3.3.0
    • Shell
    • Debian 7
    • Fully Compatible
    • Linux
    • Hide

      mongo XXX.XXX.XXX.XXX:XXXX
      db.getMongo().setReadPref('secondary');
      use XXXX;
      db.getMongo().setReadPref('secondary');
      db.XXX.find().count();

      Show
      mongo XXX.XXX.XXX.XXX:XXXX db.getMongo().setReadPref('secondary'); use XXXX; db.getMongo().setReadPref('secondary'); db.XXX.find().count();

    Description

      I setup a v3.2 mongos with 3 shards and 3 replica for each shard.

      But from shell, no matter I set readpref to 'secondary' or 'secondarypreferred', my query always go to primary.

      I haven't tried other api like java, etc.

      By the way, when I miss-spell the mode, it doesn't tell me an error.

      Attachments

        Issue Links

          Activity

            People

              adam.midvidy Adam Midvidy
              Hoyt Ren Hoyt Ren
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: