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

Do not rebuild indexes before repairing databases

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.2, 4.1.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Storage NYC 2018-08-27
    • 0

      repairDatabaseAndCheckVersion calls rebuildIndexes before attempting to call repairDatabase (which also rebuild indexes).

      If there are indexes to rebuild, this will trigger a null pointer dereference as a result of setting the RecordStore to nullptr (intentionally) when the catalog initializes the collections when started with --repair.

      Indexes will be rebuilt if reconcileCatalogAndIdents has an index in the catalog that does not exist in the storage engine. This would normally be safe when starting from an unclean shutdown.

      If the database is started with --repair, do not call rebuildIndexes before repairing databases.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: