Less robust programs may parse the proc filesystem incorrectly if there is whitespace in thread names. I propose that we debug assert that there is no whitespace in the name inside the function setThreadName.
As of now, I've found thread names containing spaces in:
- src/mongo/db/commands/generic.cpp
- src/mongo/db/index_builder.cpp
- src/mongo/db/keys_collection_manager.cpp
- src/mongo/db/repl/oplog_applier.cpp
- src/mongo/db/s/metadata_manager.cpp
- src/mongo/db/s/session_catalog_migration_destination_test.cpp
- src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
- src/mongo/dbtests/deferred_writer.cpp
- src/mongo/s/client/shard_registry.cpp