|
What is happening is that the ftsCommand and ftsCommandSharded instances of FTSCommand conflict in mongos because they both try to declare the "text" command. These objects are statically constructed, and so the order of creation is undefined. When the second one tries to register the "text" command, it uses log() to log the error message. Logstream has not been constructed yet, so we get a segfault/access violation when it tries to lock the mutex. In Windows, the unhandled exception filter has not been registered yet, so there is no code to handle the access violation and display a stack trace, so mongos.exe simply doesn't start. The same thing happens in balancer_policy_test.exe.
Moving the ftsCommand instance of FTSCommand from fts_command.cpp to fts_command_mongod.cpp prevents the conflict and makes only one instance of this object exist in each of mongod and mongos (and balancer_policy_test).
|