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

Map/Reduce Does not run on secondaries in a sharded/replica-set configuration

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.0, 2.2.1, 2.2.2
    • Component/s: Sharding
    • None
    • Environment:
      $ uname -a
      Linux pepe 3.6.8-2.fc17.x86_64 #1 SMP Tue Nov 27 19:35:02 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
      $ more /etc/redhat-release
      Fedora release 17 (Beefy Miracle)
    • Linux
    • Hide

      Start a cluster with a atleast two replica sets in a sharded configuration.
      Shard a database and collection.
      Start a mongostat to view the commands issued to each server.
      Run the attached script.

      Show
      Start a cluster with a atleast two replica sets in a sharded configuration. Shard a database and collection. Start a mongostat to view the commands issued to each server. Run the attached script.

      It appears that Map/Reduce using a readPreference of secondary is not being routed to the secondary servers by the Mongos.

      In the attached mongostat output you can clearly see that the bulk of the commands are being issued to the primary servers instead of the secondaries.

        1. mongostat_out.txt
          11 kB
        2. mr_secondaries_test.js
          0.9 kB

            Assignee:
            gianfranco Gianfranco Palumbo
            Reporter:
            robert.j.moore@allanbank.com Robert Moore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: