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

reIndex() on secondary drops all indexes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker - P1
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 1.8.4, 2.0.1, 2.1.0
    • Component/s: Indexing
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: