-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Index Maintenance, Storage
-
Fully Compatible
-
ALL
-
Repl 2018-02-12, Repl 2018-02-26
KVStorageEngine::reconcileCatalogAndIdents returns a list of (collection name, index name) pairs that need to be rebuilt. If a collection requires rebuilding multiple indexes, they will be separate entries in this list.
This API suggests that rebuilding indexes one by one would work, but that's unfortunately not true.[1]
There are two obvious ways to correct catalog::openCatalog rebuilding indexes one by one.
- Complete the TODO to enable building an index without the collection object.
- Have catalog::openCatalog group all the indexes to rebuild per collection before passing them to rebuildIndexesOnCollection.
[1] More completely: creating the collection object will cascade and create all of the in-memory index objects for that collection. The WiredTigerIndex constructor will fail when searching for the underlying table. rebuildIndexesOnCollection avoids this situation by first dropping all indexes that are to be rebuilt from the storage engine's implementation of the collection catalog. Thus when the Collection object is constructed, it does not observe the indexes to be rebuilt. Thus this bug only manifests when there is more than one missing index to rebuild on a collection.
- is depended on by
-
SERVER-29213 Have KVWiredTigerEngine implement StorageEngine::recoverToStableTimestamp
- Closed
- is related to
-
SERVER-33322 reconcileCatalogAndIdents() should also include unready indexes in set of indexes to rebuild
- Closed