These are the new files we need to add the new _configsvrRenameCollection command:
- src/mongo/s/request_types/rename_collection.idl (seeĀ src/mongo/s/request_types/shard_collection.idl as an example)
- src/mongo/db/s/config/configsvr_rename_collection_command.cpp (seeĀ src/mongo/db/s/config/configsvr_shard_collection_command.cpp as an example)
The only thing the _configsvrRenameCollection command's run needs to do for this ticket is
- parse the ConfigsvrRenameCollectionRequest (see an example)
- take NamespaceSerializer locks on the database and collection names that were in the request (see an example)
- take distributed locks on the database and collection names that were in the request(see an example)
There is no need to add explicit tests of the new command, but several jstests that expect test cases for each command will fail. Luckily, the jstest you've been working with, database_and_shard_versioning_all_commands.js, is one such test that will fail, so you can run it locally and expect it to fail to check that you've compiled the new command in correctly.