Details
Description
SERVER-69435 changed the CollectionShardingState acquisition to always take the CSSLock, rather than taking it later when accessing some of it's data (e.g. checking the shardVersion, getting the collection description). On non-shardsvrs, accessing the CSS data didn't even take the CSSLock.
After SERVER-69435, the CSSLock is taken at acquisition time, both for shard and non-shard servers. This caused performance regression on non-sharded deployments. Since for non-sharded deployments the CSSLock is not really necessary, we can skip it and improve performance.