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

reIndex on secondary fails removing all indexes

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

      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 Unassigned
            Reporter:
            tonyh Tony Hannan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: