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

reIndex() on secondary drops all indexes

    • Fully Compatible
    • ALL

      This is huge issue.

      I ran reIndex on one of our collections and this was the output:

      { 
              "nIndexesWas" : 2, 
              "msg" : "indexes dropped for collection", 
              "errmsg" : "exception: no index name specified", 
              "code" : 12523, 
              "ok" : 0 
      } 
      

      After doing this and calling getIndexes and empty list is returned. Our indexes are indeed gone.

      Luckily we ran this on a secondary machine, but this is a huge problem.

      This issue does not affect reindexing on a primary. Of course one typically does not reindex on a primary.

      Workaround: Start the target mongod without "--replSet" and on a different port, reindex, and then restart mongod again with its normal --replSet command line. Be sure to use a different port number so no traffic other than administrative hits the machine during this maintenace procedure.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            mitchellh Mitchell Hashimoto
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: