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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.2.0, 2.2.1, 2.2.2
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      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)
    • Operating System:
      Linux
    • Steps To Reproduce:
      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.

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: