-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
v9.0
-
CAR Team 2026-08-17, CAR Team 2026-08-31
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
createIndexes can reply ok: 1 without having created the requested index. The client is
told the index exists, and any later operation on it fails with IndexNotFound for example.
How it happens
- createIndexes resolves the target collection UUID and releases all locks, then blocks in the
maxNumActiveUserIndexBuilds queue in IndexBuildsCoordinatorMongod::_startIndexBuild(). The
config fuzzer had set the knob to 1, so the wait lasted ~15 seconds. - A concurrent moveCollection commits during that wait. Committing renames the temporary
resharding collection over the original namespace, so the namespace survives with a new UUID (the
reshardingUUID) and the UUID the queued build is pinned to no longer exists. - When a queue slot frees up, IndexBuildsCoordinator::_filterSpecsAndRegisterBuild() does
AutoGetCollection(nssOrUuid, MODE_X), which cannot resolve the UUID and throws
NamespaceNotFound. - runCreateIndexesWithCoordinator() catches NamespaceNotFound, treats it as "the collection
was dropped, so there is nothing to do" (LOGV2 id 20448) and returns a success reply.
The interpretation in step 4 is only valid when the collection was really dropped. Here the
namespace still exists, holding a different collection that does not have the requested index.
Why the existing resharding guards do not fire
checkShardVersionOrThrow() and resharding::throwIfReshardingInProgress() live immediately
after the failing lookup in _filterSpecsAndRegisterBuild(), so the NamespaceNotFound is
raised before either runs. The resharding operation has also already completed and deregistered by
then, so ReshardCollectionInProgress would not be raised even if reached.
- is related to
-
SERVER-133430 [master] Revert SERVER-132822
-
- Closed
-
- related to
-
SERVER-134531 timeseries_create_indexes.js FSM workload does not tolerate ConflictingOperationInProgress from createIndexes
-
- Closed
-
-
SERVER-134450 Add regression tests for concurrent implicit collection creation during createIndexes
-
- In Code Review
-