diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-03-30 14:35:44 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-03-30 14:35:44 -0400 |
commit | 16d9f533ab2ac1f0559af16f8095f2503463650c (patch) | |
tree | b6289a365a84e688b826996a2ee8a59572015fac /src | |
parent | 325486685538d00adbd61f868c239b3ecc6938c6 (diff) | |
download | mongo-16d9f533ab2ac1f0559af16f8095f2503463650c.tar.gz |
SERVER-28528 Remove some unnecessary cycle marks
There were some superfluous cycle markings which can be easily
resolved, now that some parts of the dependency graph are fixed.
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/SConscript | 7 | ||||
-rw-r--r-- | src/mongo/db/catalog/index_catalog_entry.h | 43 | ||||
-rw-r--r-- | src/mongo/db/index/SConscript | 5 | ||||
-rw-r--r-- | src/mongo/db/repl/SConscript | 51 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/SConscript | 3 | ||||
-rw-r--r-- | src/mongo/s/catalog/SConscript | 5 |
7 files changed, 47 insertions, 69 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 7bf9032d005..68bd5121e5a 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -566,8 +566,11 @@ env.Library( 'db_raii.cpp', ], LIBDEPS=[ + 'curop', 'stats/top', 'views/views', + '$BUILD_DIR/mongo/db/concurrency/lock_manager', + '$BUILD_DIR/mongo/db/s/sharding', #'catalog/catalog', # CYCLE ], LIBDEPS_TAGS=[ @@ -596,7 +599,7 @@ env.Library( '$BUILD_DIR/mongo/client/clientdriver', 'curop', 'lasterror', - # 'assemble_response', # CYCLE + #'assemble_response', # CYCLE ], LIBDEPS_TAGS=[ # TODO(ADAM, 2017-01-09): See `CYCLE` tags above @@ -716,7 +719,7 @@ env.Library( LIBDEPS=[ "db_raii", "index/index_access_methods", - #"catalog/catalog", # CYCYLE + #"catalog/catalog", # CYCLE ], LIBDEPS_TAGS=[ # TODO(ADAM, 2017-03-10): See `CYCLE` tags above. diff --git a/src/mongo/db/catalog/index_catalog_entry.h b/src/mongo/db/catalog/index_catalog_entry.h index 66eac041713..e77c8914b6b 100644 --- a/src/mongo/db/catalog/index_catalog_entry.h +++ b/src/mongo/db/catalog/index_catalog_entry.h @@ -100,24 +100,6 @@ public: }; private: - std::unique_ptr<Impl> _pimpl; - struct TUHook { - static void hook() noexcept; - - explicit inline TUHook() noexcept { - if (kDebugBuild) - this->hook(); - } - }; - inline const Impl& _impl() const { - TUHook{}; - return *this->_pimpl; - } - inline Impl& _impl() { - TUHook{}; - return *this->_pimpl; - } - static std::unique_ptr<Impl> makeImpl(IndexCatalogEntry* this_, OperationContext* opCtx, StringData ns, @@ -247,6 +229,31 @@ public: void setMinimumVisibleSnapshot(const SnapshotName name) { return this->_impl().setMinimumVisibleSnapshot(name); } + +private: + // This structure exists to give us a customization point to decide how to force users of this + // class to depend upon the corresponding `index_catalog_entry.cpp` Translation Unit (TU). All + // public forwarding functions call `_impl(), and `_impl` creates an instance of this structure. + struct TUHook { + static void hook() noexcept; + + explicit inline TUHook() noexcept { + if (kDebugBuild) + this->hook(); + } + }; + + inline const Impl& _impl() const { + TUHook{}; + return *this->_pimpl; + } + + inline Impl& _impl() { + TUHook{}; + return *this->_pimpl; + } + + std::unique_ptr<Impl> _pimpl; }; class IndexCatalogEntryContainer { diff --git a/src/mongo/db/index/SConscript b/src/mongo/db/index/SConscript index 545ee2720c8..5e25eca159c 100644 --- a/src/mongo/db/index/SConscript +++ b/src/mongo/db/index/SConscript @@ -102,10 +102,5 @@ serveronlyEnv.Library( 'expression_params', 'index_descriptor', 'key_generator', - #'$BUILD_DIR/mongo/db/catalog/catalog', # CYCLE - ], - LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-03-10): See `CYCLE` tags above - 'illegal_cyclic_or_unresolved_dependencies_whitelisted', ], ) diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript index 7931b0d082f..d440a6b2767 100644 --- a/src/mongo/db/repl/SConscript +++ b/src/mongo/db/repl/SConscript @@ -15,7 +15,6 @@ env.Library( 'oplog_interface_local', 'repl_coordinator_interface', 'rollback_impl', - 'rollback_source_impl', 'rs_rollback', 'storage_interface', 'sync_source_resolver', @@ -231,11 +230,11 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/db/query/internal_plans', '$BUILD_DIR/mongo/db/query/query', - #'$BUILD_DIR/mongo/db/db_raii', # CYCLE + '$BUILD_DIR/mongo/db/db_raii', #'$BUILD_DIR/mongo/db/catalog/catalog', # CYCLE ], LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-01-10): See `CYCLE` tags above. + # TODO(ADAM, 2017-03-28): See `CYCLE` tags above. 'illegal_cyclic_or_unresolved_dependencies_whitelisted', ], ) @@ -267,9 +266,10 @@ env.Library( ], LIBDEPS=[ 'roll_back_local_operations', - #'$BUILD_DIR/mongo/db/s/sharding', # CYCLE + '$BUILD_DIR/mongo/db/s/sharding', + '$BUILD_DIR/mongo/util/fail_point', + '$BUILD_DIR/mongo/db/dbhelpers', #'$BUILD_DIR/mongo/db/catalog/catalog', # CYCLE - #'$BUILD_DIR/mongo/db/dbhelpers', # CYCLE #'$BUILD_DIR/mongo/db/db_raii', # CYCLE ], LIBDEPS_TAGS=[ @@ -342,15 +342,11 @@ env.Library( 'optime', 'repl_coordinator_interface', '$BUILD_DIR/mongo/db/concurrency/lock_manager', - #'$BUILD_DIR/mongo/db/s/sharding', # CYCLE + '$BUILD_DIR/mongo/db/s/sharding', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/executor/task_executor_interface', '$BUILD_DIR/mongo/util/net/hostandport', ], - LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-01-09): See `CYCLE` tags above - 'illegal_cyclic_or_unresolved_dependencies_whitelisted', - ] ) env.CppUnitTest( @@ -368,25 +364,6 @@ env.CppUnitTest( ) env.Library( - target='rollback_source_impl', - source=[ - 'rollback_source_impl.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/client/clientdriver', - 'oplog_interface_remote', - #'serveronly', # CYCLE - #'$BUILD_DIR/mongo/db/cloner', # CYCLE - ], - LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-01-10): See `CYCLE` tags above. - 'illegal_cyclic_or_unresolved_dependencies_whitelisted', - ], - -) - -env.Library( target='oplog_entry', source=[ 'oplog_entry.cpp', @@ -1226,11 +1203,14 @@ env.Library( "replication_coordinator_external_state_impl.cpp", "replication_info.cpp", "resync.cpp", + 'rollback_source_impl.cpp', "rs_sync.cpp", "sync_source_feedback.cpp", ], LIBDEPS=[ 'bgsync', + 'oplog_buffer_collection', + 'oplog_interface_remote', 'optime', 'repl_coordinator_interface', 'repl_coordinator_impl', @@ -1253,16 +1233,13 @@ env.Library( '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/db/repl/oplog_buffer_proxy', '$BUILD_DIR/mongo/db/commands/core', - # '$BUILD_DIR/mongo/db/ops/write_ops', # CYCLE + '$BUILD_DIR/mongo/db/cloner', + '$BUILD_DIR/mongo/db/index_d', + '$BUILD_DIR/mongo/db/repair_database', # '$BUILD_DIR/mongo/db/catalog/catalog', # CYCLE - # '$BUILD_DIR/mongo/db/dbhelpers', # CYCLE - # '$BUILD_DIR/mongo/db/db_raii,' # CYCLE - # '$BUILD_DIR/mongo/db/cloner,' # CYCLE - # '$BUILD_DIR/mongo/db/index/index_access_methods', # CYCLE - # '$BUILD_DIR/mongo/db/repl/oplog_buffer_collection', # CYCLE ], LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-01-05): See `CYCLE` tags above. - 'illegal_cyclic_or_unresolved_dependencies_whitelisted', + # TODO(ADAM, 2017-03-28): See `CYCLE` tags above. + 'illegal_cyclic_or_unresolved_dependencies_whitelisted', ], ) diff --git a/src/mongo/db/storage/mmap_v1/SConscript b/src/mongo/db/storage/mmap_v1/SConscript index b9a1f1b9b83..c63c27335d6 100644 --- a/src/mongo/db/storage/mmap_v1/SConscript +++ b/src/mongo/db/storage/mmap_v1/SConscript @@ -61,7 +61,7 @@ env.Library( '$BUILD_DIR/mongo/db/index/index_descriptor', '$BUILD_DIR/mongo/db/storage/journal_listener', '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file', - # '$BUILD_DIR/mongo/db/index/index_access_methods', # CYCLE + '$BUILD_DIR/mongo/db/index/index_access_methods', # '$BUILD_DIR/mongo/db/catalog/catalog', # CYCLE ], LIBDEPS_TAGS=[ diff --git a/src/mongo/db/storage/wiredtiger/SConscript b/src/mongo/db/storage/wiredtiger/SConscript index be65a2008ea..4eb78eb07d5 100644 --- a/src/mongo/db/storage/wiredtiger/SConscript +++ b/src/mongo/db/storage/wiredtiger/SConscript @@ -83,10 +83,11 @@ if wiredtiger: '$BUILD_DIR/mongo/db/storage/kv/kv_engine', '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file', '$BUILD_DIR/mongo/db/storage/storage_engine_metadata', + '$BUILD_DIR/mongo/db/commands/dcommands', #'$BUILD_DIR/mongo/db/catalog/catalog', # CYCLE ], LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-03-10): See `CYCLE` tags above + # TODO(ADAM, 2017-03-28): See `CYCLE` tags above 'illegal_cyclic_or_unresolved_dependencies_whitelisted', ], ) diff --git a/src/mongo/s/catalog/SConscript b/src/mongo/s/catalog/SConscript index 2db63510c77..879d3080806 100644 --- a/src/mongo/s/catalog/SConscript +++ b/src/mongo/s/catalog/SConscript @@ -11,11 +11,6 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/db/write_concern_options', - #'$BUILD_DIR/mongo/db/s/balancer', # CYCLE - ], - LIBDEPS_TAGS=[ - # TODO(ADAM, 2017-03-10): See `CYCLE` tags above - 'illegal_cyclic_or_unresolved_dependencies_whitelisted', ], ) |