|
This is hypothetical, we haven't tried to reproduce it.
The scenario looks like this:
- Collection exists and is unsharded.
- Mongos attaches shard version UNSHARDED to the request.
- acquireCollectionWithoutLocks checksShardingPlacement, it is correct.
- Collection becomes sharded from some other client running shardCollection.
- acquireCollectionWithoutLocks opens the snapshot at this point.
- Collection is dropped from some other client running drop.
- Collection is created again as unsharded from some other client running create.
- acquireCollectionWithoutLocks checksShardingPlacement again and everything checks out because the request was sent with shard version UNSHARDED and the collection is (again now) unsharded.
Currently we have a check to prevent this exact scenario described in SERVER-62457 in the AutoGetCollectionForLockFreeReads case, however it might be broken, see SERVER-76559.
|