The invariant in IndexCatalogImpl::createIndexOnEmptyCollection() relies on the fast count for the collection being accurate. This is not always the case, especially in rollback scenarios. A more reliable way to determine if the collection is empty is to check the record store using Collection::isEmpty().
- is related to
-
SERVER-45718 Index builder can skip index building for a non-empty collections due to incorrect fast count value.
- Closed
-
SERVER-47356 Remove invariant that fast count is 0 when creating an index on an empty collection
- Closed
-
WT-7408 API to return row and byte counts for objects and cursor ranges
- Backlog