reIndex on secondary fails removing all indexes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.0.0
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Shell:
      SECONDARY> rs.slaveOk()
      SECONDARY> db.foo.getIndexes()
      [
      {
      "v" : 1,
      "key" :

      { "_id" : 1 }

      ,
      "ns" : "test.foo",
      "name" : "id"
      },
      {
      "v" : 0,
      "key" :

      { "x" : 1, "y" : 1 }

      ,
      "ns" : "test.foo",
      "name" : "x_1_y_1"
      }
      ]
      SECONDARY> db.foo.reIndex()
      {
      "nIndexesWas" : 2,
      "msg" : "indexes dropped for collection",
      "errmsg" : "exception: no index name specified",
      "code" : 12523,
      "ok" : 0
      }
      SECONDARY> db.foo.getIndexes()
      [ ]

      Secondary server log:
      Wed Sep 14 10:05:59 [conn5] CMD: reIndex test.foo
      Wed Sep 14 10:05:59 [conn5] assertion 13435 not master and slaveok=false ns:test.system.indexes query:

      { ns: "test.foo" }

              Assignee:
              Unassigned
              Reporter:
              Tony Hannan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: