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

Sharding status not communicated across Routers (mongoS)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.1
    • Affects Version/s: 1.8.0
    • Component/s: Sharding
    • Labels:
      None
    • ALL

      Repro on 1.8.0.

      1. Start sharded set
      2. Start config DB
      3. Start 2 MongoS both pointing at config DB
      4. Open 2 windows
      4.a. mongoS #1
      4.b. mongoS #2

      In #2
      > use infinity
      > db.events_test.stats()

      In #1
      > use admin
      > db.runCommand(

      {enablesharding : "infinity"}

      )
      > db.runCommand({shardcollection: "infinity.events_test", key: {_id: 1}});
      > db.events_test.stats()

      In #2
      > db.events_test.stats()

      ===
      Bug here
      The first thing you'll see here is that #1 & #2 do not match.
      #1 will say the collection is sharded
      #2 will say the collection is not sharded
      ===

      More fun:
      #1
      > db.events_test.ensureIndex(

      {event_name : 1}

      );
      > db.events_test.stats()

      #2
      > db.events_test.stats()

      Notice how the indexes were properly communicated?

      So we somehow communicated the indexes, but not the sharding status.
      I can write to both collections and the data appears.

      ===
      Resolution: bouncing mongoS solves the problem
      ===

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            gatesvp Gaetan Voyer-Perrault
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: