Description
TheĀ ConvertToCapped command should not be run on sharded collections. But the command on an unsharded collection does not check for collection version from the mongos before executing the command. This can cause the command to be executed on a sharded cluster if sent from a stale mongos that doesn't know the collection is sharded.
We should add a check in this command on the shard to ensure it does not run from a mongos with a stale collection version.