-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
Fully Compatible
-
Platforms 15 (06/03/16), Platforms 2017-03-06
-
0
Currently we have several classes of problems that prevent us from being able to properly express all of the library dependencies in the build system:
- Circular library dependences (see db/query/query and db/exec/exec).
- Symbols that lack a unique definition and are defined differently in different contexts (see isMongos, or Command::execCommand).
- Unexpressed edges, where one library does actually depend on another, but does not declare it.
There are several adverse consequences to this situation, which include:
- The inability to build under UBSAN, which more aggressively needs symbol information, so fails to link executables that normally link.
- The inability to easily refactor library dependencies.
- The inability to link all libraries with -z defs, which makes it impossible to hold the line against making the library graph more tangled.
Here is a list of currently known multiply defined symbols:
multiple definition of `mongo::cmdAuthSchemaUpgrade' multiple definition of `mongo::cmdCreateRole' multiple definition of `mongo::cmdCreateUser' multiple definition of `mongo::cmdDropAllRolesFromDatabase' multiple definition of `mongo::cmdDropAllUsersFromDatabase' multiple definition of `mongo::cmdDropRole' multiple definition of `mongo::cmdDropUser' multiple definition of `mongo::cmdGrantPrivilegesToRole' multiple definition of `mongo::cmdGrantRolesToRole' multiple definition of `mongo::cmdGrantRolesToUser' multiple definition of `mongo::cmdInvalidateUserCache' multiple definition of `mongo::cmdMergeAuthzCollections' multiple definition of `mongo::cmdRevokePrivilegesFromRole' multiple definition of `mongo::cmdRevokeRolesFromRole' multiple definition of `mongo::cmdRevokeRolesFromUser' multiple definition of `mongo::cmdRolesInfo' multiple definition of `mongo::cmdUpdateRole' multiple definition of `mongo::cmdUpdateUser' multiple definition of `mongo::cmdUsersInfo' multiple definition of `mongo::Command::execCommand(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*)' multiple definition of `mongo::Command::findCommand(mongo::StringData)' multiple definition of `mongo::Command::registerError(mongo::OperationContext*, mongo::DBException const&)' multiple definition of `mongo::createDirectClient(mongo::OperationContext*)' multiple definition of `mongo::detail::signedCompare(double, double)' multiple definition of `mongo::detail::signedCompare(double, long)' multiple definition of `mongo::detail::signedCompare(double, unsigned long)' multiple definition of `mongo::detail::signedCompare(long, double)' multiple definition of `mongo::detail::signedCompare(long, long)' multiple definition of `mongo::detail::signedCompare(long, unsigned long)' multiple definition of `mongo::detail::signedCompare(unsigned long, double)' multiple definition of `mongo::detail::signedCompare(unsigned long, long)' multiple definition of `mongo::detail::signedCompare(unsigned long, unsigned long)' multiple definition of `mongo::executor::makeCallbackHandle()' multiple definition of `mongo::haveLocalShardingInfo(mongo::OperationContext*, std::string const&)' multiple definition of `_mongoInitializerFunction_ForkServer(mongo::InitializerContext*)' multiple definition of `mongo::isMongos()' multiple definition of `mongo::KVDatabaseCatalogEntry::getIndex(mongo::OperationContext*, mongo::CollectionCatalogEntry const*, mongo::IndexCatalogEntry*)' multiple definition of `mongo::KVHarnessHelper::create()' multiple definition of `mongo::logProcessDetailsForLogRotate()' multiple definition of `mongo::_mongoInitializerFunction_SetGlobalEnvironment(mongo::InitializerContext*)' multiple definition of `mongo::myall' multiple definition of `mongo::newHarnessHelper()' multiple definition of `mongo::usingAShardConnection(std::string const&)' multiple definition of `mongo::WiredTigerKVEngine::initRsOplogBackgroundThread(mongo::StringData)'
- depends on
-
SERVER-27284 de-dup symbol `mongo::KVHarnessHelper::create`
- Closed
-
SERVER-27361 de-duplicate multiply defined symbol `initRsOplogBackgroundThread`
- Closed
-
SERVER-27435 Create an evergreen task to check for multiply defined symbols
- Closed
-
SERVER-27211 de-duplicate multiply defined symbol `isMongos`
- Closed
-
SERVER-27225 de-duplicate multiply defined symbol `_mongoInitializerFunction_ForkServer`
- Closed
-
SERVER-27233 de-duplicate multiply defined symbol `myall`
- Closed
-
SERVER-27238 de-duplicate multiply defined symbol `logProcessDetailsForLogRotate`
- Closed
-
SERVER-27257 Deduplicate multiply defined symbol `newHarnessHelper`
- Closed
-
SERVER-27287 Deduplicate `_mongoInitializerFunction_SetGlobalEnvironment` symbol
- Closed
-
SERVER-27325 de-duplicate multiply defined symbol `mongo::usingAShardConnection`
- Closed
-
SERVER-27326 Dedupe multiply defined symbol `KVDatabaseCatalogEntry::getIndex`
- Closed
-
SERVER-27367 Deduplicate multiply defined member functions of the mongo::Command class
- Closed
-
SERVER-27384 Deduplicate two `mongo::Command` classes
- Closed
-
SERVER-27391 Deduplicate `Command::registerError` symbol
- Closed
-
SERVER-27415 Deduplicate `Command::execCommand` symbol
- Closed
-
SERVER-27912 Stand up an interface to `src/mongo/db/catalog` libraries that are in circular dependencies
- Closed
-
SERVER-28025 Break `index_access_method`'s dependency on Catalog
- Closed
-
SERVER-28281 Rotate dependency graph "breaks" to make catalog fully resolved
- Closed
-
SERVER-28552 Stand up interface to `Database` in catalog
- Closed
-
SERVER-28600 Slice `catalog/collection` class into a vtable to break cycles.
- Closed
-
SERVER-28657 Revisit library dependency graph, repairing hidden edges
- Closed
-
SERVER-28805 Slice `catalog/index_catalog` into vtable to break cycles
- Closed
-
SERVER-28811 Resolve satisfiable build graph dependencies using new vtables
- Closed
-
SERVER-28832 Slice `catalog/collection_info_cache` using a vtable
- Closed
-
SERVER-28842 Slice `catalog/database_holder` using a vtable
- Closed
-
SERVER-28851 Resolve more cycles from further vtable usage.
- Closed
-
SERVER-28966 Slice `MultiIndexBlock` class with vtable
- Closed
-
SERVER-28967 Remove cycle whitelist marks made redundant by the latest changes
- Closed
-
SERVER-29225 Split off Catalog free functions into a separate library
- Closed
-
SERVER-29235 Ripple through resolutions to resolvable libraries
- Closed
-
SERVER-29236 Resolve `dbdirectclient` library
- Closed
-
SERVER-29252 Update build graph and resolve completed nodes
- Closed
-
SERVER-29253 Merge `catalog/cursor_manager` into library with `db/clientcursror`
- Closed
-
SERVER-29305 Make dbdirectclient call into assemble response through opcontext vtable
- Closed
- is depended on by
-
SERVER-27506 Reduce library graph complexity
- Closed
-
SERVER-28528 Remove some unnecessary cycle whitelisting
- Closed
- is related to
-
SERVER-23291 exit_logging.js regex no longer matches after change to exit subsystem
- Closed
- related to
-
SERVER-23298 Refactor ShardingConnectionHook and ShardingEgressMetadataHook to improve compile graph
- Closed