diff options
author | Andrew Morrow <acm@mongodb.com> | 2018-01-09 14:39:34 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2018-01-10 21:26:25 -0500 |
commit | 9d1f323a131ba5e3e1af79973ae79910de10a957 (patch) | |
tree | f5d7f5463069ce3462adbf819450e68a64c8c2a1 /src/mongo/db/SConscript | |
parent | 37cb7ea09393e88662e3139bd20fa29e59f2a1a3 (diff) | |
download | mongo-9d1f323a131ba5e3e1af79973ae79910de10a957.tar.gz |
SERVER-30815 Refactor libraries to reduce cycles
- Merge db/s/split_vector and db/s/split_chunk into db/s/sharding, since they
were directly mutually cyclic with it.
- Split db/index/index_access_method out of db/index/index_access_methods, so
that libquery_exec can use the abstract class without needing to know about the
detailed implementations
- Combine db/clientcursor, db/query/{query,internal_plans},
db/exec/exec, parts of db/write_ops, and
db/pipeline/serveronly_pipeline, into a new db/libquery_exec library.
- Split a new library s/grid out of s/coreshard, and fold the parts of
s/client/sharding_client into s/grid that were cyclic with coreshard, solving
this cycle.
- Adds/removes a few stray LIBDEPS here or there as needed to make the above
transformations work.
After making this transformation, we will be left with one important cycle: the
new db/libquery_exec is still cyclic with db/s/sharding
Diffstat (limited to 'src/mongo/db/SConscript')
-rw-r--r-- | src/mongo/db/SConscript | 180 |
1 files changed, 128 insertions, 52 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index baf6fc4e44f..f0dd5c1ac1f 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -568,8 +568,9 @@ env.Library( 'dbhelpers.cpp', ], LIBDEPS=[ + 'query_exec', 'db_raii', - 'index/index_access_methods', + 'index/index_access_method', 'write_ops', ], ) @@ -582,6 +583,7 @@ env.Library( LIBDEPS=[ 'db_raii', 'catalog/index_key_validate', + 'concurrency/write_conflict_exception', ], ) @@ -634,31 +636,14 @@ env.Library( ) env.Library( - target="clientcursor", - source=[ - "clientcursor.cpp", - "cursor_manager.cpp", - ], - LIBDEPS=[ - "$BUILD_DIR/mongo/base", - "$BUILD_DIR/mongo/db/logical_session_cache", - "$BUILD_DIR/mongo/db/logical_session_id", - "$BUILD_DIR/mongo/util/background_job", - "cursor_server_params", - "background", - "query/query", - ], -) - -env.Library( target="cloner", source=[ "cloner.cpp", ], LIBDEPS=[ 'dbdirectclient', - 'write_ops', 'repl/isself', + 'write_ops', '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/catalog/index_create', ], @@ -707,7 +692,7 @@ env.Library( ], LIBDEPS=[ 'dbhelpers', - 'index/index_access_methods', + 'index/index_access_method', '$BUILD_DIR/mongo/db/storage/mmap_v1/mmap', ], ) @@ -756,8 +741,7 @@ env.Library( LIBDEPS=[ "commands/dcommands_fsync", "db_raii", - "write_ops", - "query/query", + "query_exec", "ttl_collection_cache", ], ) @@ -773,6 +757,106 @@ env.Library( ) env.Library( + target='query_exec', + source=[ + 'clientcursor.cpp', + 'cursor_manager.cpp', + 'exec/and_hash.cpp', + 'exec/and_sorted.cpp', + 'exec/cached_plan.cpp', + 'exec/collection_scan.cpp', + 'exec/count.cpp', + 'exec/count_scan.cpp', + 'exec/delete.cpp', + 'exec/distinct_scan.cpp', + 'exec/ensure_sorted.cpp', + 'exec/eof.cpp', + 'exec/fetch.cpp', + 'exec/geo_near.cpp', + 'exec/group.cpp', + 'exec/idhack.cpp', + 'exec/index_iterator.cpp', + 'exec/index_scan.cpp', + 'exec/keep_mutations.cpp', + 'exec/limit.cpp', + 'exec/merge_sort.cpp', + 'exec/multi_iterator.cpp', + 'exec/multi_plan.cpp', + 'exec/near.cpp', + 'exec/oplogstart.cpp', + 'exec/or.cpp', + 'exec/pipeline_proxy.cpp', + 'exec/plan_stage.cpp', + 'exec/projection.cpp', + 'exec/projection_exec.cpp', + 'exec/queued_data_stage.cpp', + 'exec/shard_filter.cpp', + 'exec/skip.cpp', + 'exec/sort.cpp', + 'exec/sort_key_generator.cpp', + 'exec/subplan.cpp', + 'exec/text.cpp', + 'exec/text_match.cpp', + 'exec/text_or.cpp', + 'exec/update.cpp', + 'exec/working_set_common.cpp', + 'exec/write_stage_common.cpp', + 'ops/parsed_delete.cpp', + 'ops/parsed_update.cpp', + 'ops/update_lifecycle_impl.cpp', + 'ops/update_result.cpp', + 'query/explain.cpp', + 'query/find.cpp', + 'pipeline/document_source_cursor.cpp', + 'pipeline/pipeline_d.cpp', + 'query/get_executor.cpp', + 'query/internal_plans.cpp', + 'query/plan_executor.cpp', + 'query/plan_ranker.cpp', + 'query/plan_yield_policy.cpp', + 'query/query_yield.cpp', + 'query/stage_builder.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/s/common_s', + '$BUILD_DIR/mongo/scripting/scripting', + '$BUILD_DIR/mongo/util/background_job', + '$BUILD_DIR/mongo/util/elapsed_tracker', + '$BUILD_DIR/third_party/s2/s2', + 'background', + 'bson/dotted_path_support', + 'catalog/collection', + 'catalog/collection_info_cache', + 'catalog/database', + 'catalog/document_validation', + 'catalog/index_catalog', + 'catalog/index_catalog_entry', + 'commands', + 'concurrency/write_conflict_exception', + 'curop', + 'cursor_server_params', + 'db_raii', + 'exec/scoped_timer', + 'exec/working_set', + 'fts/base_fts', + 'index/index_descriptor', + 'index/key_generator', + 'logical_session_cache', + 'matcher/expressions_mongod_only', + 'pipeline/pipeline', + 'query/query_common', + 'query/query_planner', + 'repl/repl_coordinator_global', + 'repl/repl_coordinator_interface', + 's/sharding', + 'stats/serveronly_stats', + 'storage/oplog_hack', + 'storage/storage_options', + ], +) + +env.Library( target="serveronly", source=[ # DO NOT ADD ADDITIONAL FILES TO THIS LIST. @@ -801,7 +885,6 @@ env.Library( "catalog/collection_options", "catalog/document_validation", "catalog/index_key_validate", - "clientcursor", "cloner", "collection_index_usage_tracker", "commands/dcommands", @@ -814,23 +897,20 @@ env.Library( "db_raii", "dbdirectclient", "dbhelpers", - "exec/exec", "exec/working_set", "ftdc/ftdc_mongod", "fts/ftsmongod", - "index/index_access_methods", + "index/index_access_method", "index/index_descriptor", "index_d", "introspect", 'keys_collection_client_direct', "matcher/expressions_mongod_only", "op_observer_d", - "write_ops", "ops/write_ops_parsers", "pipeline/aggregation", - "pipeline/serveronly_pipeline", "prefetch", - "query/query", + "query_exec", "repair_database", "repl/bgsync", "repl/oplog_buffer_blocking_queue", @@ -956,7 +1036,7 @@ envWithAsio.Library( '$BUILD_DIR/mongo/db/logical_session_id', '$BUILD_DIR/mongo/util/clock_sources', '$BUILD_DIR/mongo/util/periodic_runner', - 'clientcursor', + 'query_exec', 'service_context', 'service_liason', ], @@ -1203,8 +1283,8 @@ env.Library( 'kill_sessions_local.cpp', ], LIBDEPS=[ - 'clientcursor', 'kill_sessions', + 'query_exec', ], ) @@ -1540,11 +1620,7 @@ env.Library( 'ops/delete.cpp', 'ops/find_and_modify_result.cpp', 'ops/insert.cpp', - 'ops/parsed_delete.cpp', - 'ops/parsed_update.cpp', 'ops/update.cpp', - 'ops/update_lifecycle_impl.cpp', - 'ops/update_result.cpp', 'ops/write_ops_retryability.cpp', 'session.cpp', 'session_catalog.cpp', @@ -1554,22 +1630,22 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/catalog/collection_info_cache', - '$BUILD_DIR/mongo/db/concurrency/lock_manager', - '$BUILD_DIR/mongo/db/curop_metrics', - '$BUILD_DIR/mongo/db/dbdirectclient', - '$BUILD_DIR/mongo/db/introspect', - '$BUILD_DIR/mongo/db/index/index_access_methods', - '$BUILD_DIR/mongo/db/logical_session_id', - '$BUILD_DIR/mongo/db/matcher/expressions_mongod_only', - '$BUILD_DIR/mongo/db/namespace_string', - '$BUILD_DIR/mongo/db/query/command_request_response', - '$BUILD_DIR/mongo/db/query/query', - '$BUILD_DIR/mongo/db/repl/oplog_entry', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_impl', - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/update/update_driver', '$BUILD_DIR/mongo/idl/idl_parser', + 'catalog/collection_info_cache', + 'concurrency/lock_manager', + 'curop_metrics', + 'dbdirectclient', + 'index/index_access_method', + 'introspect', + 'logical_session_id', + 'matcher/expressions_mongod_only', + 'namespace_string', + 'query_exec', + 'query/command_request_response', + 'repl/oplog_entry', + 'repl/repl_coordinator_impl', + 'service_context', + 'update/update_driver', ], ) @@ -1580,8 +1656,8 @@ env.CppUnitTest( 'session_test.cpp', ], LIBDEPS=[ + 'query_exec', '$BUILD_DIR/mongo/db/repl/mock_repl_coord_server_fixture', - 'write_ops', ], ) @@ -1591,8 +1667,8 @@ env.CppUnitTest( 'transaction_history_iterator_test.cpp', ], LIBDEPS=[ + 'query_exec', '$BUILD_DIR/mongo/db/repl/mock_repl_coord_server_fixture', - 'write_ops', + ], ) - |