diff options
14 files changed, 39 insertions, 37 deletions
diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript index 150fa1deb51..952f7baf5f6 100644 --- a/src/mongo/db/pipeline/SConscript +++ b/src/mongo/db/pipeline/SConscript @@ -168,17 +168,6 @@ env.Library( ) env.Library( - target='cluster_aggregation_planner', - source=[ - 'cluster_aggregation_planner.cpp', - ], - LIBDEPS=[ - 'pipeline', - '$BUILD_DIR/mongo/s/query/cluster_client_cursor', - ] -) - -env.Library( target='granularity_rounder', source=[ 'granularity_rounder.cpp', @@ -450,7 +439,7 @@ env.CppUnitTest( '$BUILD_DIR/mongo/db/repl/replmocks', '$BUILD_DIR/mongo/db/service_context_test_fixture', '$BUILD_DIR/mongo/s/is_mongos', - 'cluster_aggregation_planner', + '$BUILD_DIR/mongo/s/query/cluster_aggregate', 'document_source_mock', 'document_value_test_util', 'pipeline', diff --git a/src/mongo/db/pipeline/pipeline_test.cpp b/src/mongo/db/pipeline/pipeline_test.cpp index 371f5f9dc89..65d3c4fecc0 100644 --- a/src/mongo/db/pipeline/pipeline_test.cpp +++ b/src/mongo/db/pipeline/pipeline_test.cpp @@ -34,7 +34,6 @@ #include "mongo/db/operation_context_noop.h" #include "mongo/db/pipeline/aggregation_context_fixture.h" -#include "mongo/db/pipeline/cluster_aggregation_planner.h" #include "mongo/db/pipeline/dependencies.h" #include "mongo/db/pipeline/document.h" #include "mongo/db/pipeline/document_source.h" @@ -54,6 +53,7 @@ #include "mongo/db/query/query_test_service_context.h" #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/dbtests/dbtests.h" +#include "mongo/s/query/cluster_aggregation_planner.h" #include "mongo/unittest/death_test.h" namespace mongo { diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript index f39ee98cc70..f64f1ea68d5 100644 --- a/src/mongo/s/commands/SConscript +++ b/src/mongo/s/commands/SConscript @@ -35,7 +35,6 @@ env.Library( 'cluster_abort_transaction_cmd.cpp', 'cluster_add_shard_cmd.cpp', 'cluster_add_shard_to_zone_cmd.cpp', - 'cluster_aggregate.cpp', 'cluster_available_query_options_cmd.cpp', 'cluster_build_info.cpp', 'cluster_coll_stats_cmd.cpp', @@ -118,12 +117,11 @@ env.Library( '$BUILD_DIR/mongo/db/handle_request_response', '$BUILD_DIR/mongo/db/logical_session_cache_impl', '$BUILD_DIR/mongo/db/pipeline/aggregation', - '$BUILD_DIR/mongo/db/pipeline/mongos_process_interface', - '$BUILD_DIR/mongo/db/pipeline/cluster_aggregation_planner', '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/db/views/views', '$BUILD_DIR/mongo/executor/async_multicaster', '$BUILD_DIR/mongo/rpc/client_metadata', + '$BUILD_DIR/mongo/s/query/cluster_aggregate', '$BUILD_DIR/mongo/s/query/cluster_client_cursor', '$BUILD_DIR/mongo/s/sharding_api', '$BUILD_DIR/mongo/s/sharding_legacy_api', @@ -174,19 +172,6 @@ env.Library( ) env.CppUnitTest( - target="cluster_aggregate_test", - source=[ - "cluster_aggregate_test.cpp", - ], - LIBDEPS=[ - 'cluster_commands', - 'cluster_command_test_fixture', - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/auth/saslauth', - ], -) - -env.CppUnitTest( target="cluster_distinct_test", source=[ "cluster_distinct_test.cpp", diff --git a/src/mongo/s/commands/cluster_count_cmd.cpp b/src/mongo/s/commands/cluster_count_cmd.cpp index 6fdd4a2d0f0..9746eae823f 100644 --- a/src/mongo/s/commands/cluster_count_cmd.cpp +++ b/src/mongo/s/commands/cluster_count_cmd.cpp @@ -37,11 +37,11 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/catalog_cache.h" -#include "mongo/s/commands/cluster_aggregate.h" #include "mongo/s/commands/cluster_commands_helpers.h" #include "mongo/s/commands/cluster_explain.h" #include "mongo/s/commands/strategy.h" #include "mongo/s/grid.h" +#include "mongo/s/query/cluster_aggregate.h" #include "mongo/util/timer.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_current_op.cpp b/src/mongo/s/commands/cluster_current_op.cpp index 8d46da6d193..d9c2257c644 100644 --- a/src/mongo/s/commands/cluster_current_op.cpp +++ b/src/mongo/s/commands/cluster_current_op.cpp @@ -37,7 +37,7 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/client.h" #include "mongo/db/pipeline/document.h" -#include "mongo/s/commands/cluster_aggregate.h" +#include "mongo/s/query/cluster_aggregate.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_distinct_cmd.cpp b/src/mongo/s/commands/cluster_distinct_cmd.cpp index cffde0ec3b0..0f39fc74044 100644 --- a/src/mongo/s/commands/cluster_distinct_cmd.cpp +++ b/src/mongo/s/commands/cluster_distinct_cmd.cpp @@ -37,10 +37,10 @@ #include "mongo/db/query/view_response_formatter.h" #include "mongo/db/views/resolved_view.h" #include "mongo/rpc/get_status_from_command_result.h" -#include "mongo/s/commands/cluster_aggregate.h" #include "mongo/s/commands/cluster_commands_helpers.h" #include "mongo/s/commands/cluster_explain.h" #include "mongo/s/grid.h" +#include "mongo/s/query/cluster_aggregate.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_find_cmd.cpp b/src/mongo/s/commands/cluster_find_cmd.cpp index a69d1e4a44f..48ec7cb20c4 100644 --- a/src/mongo/s/commands/cluster_find_cmd.cpp +++ b/src/mongo/s/commands/cluster_find_cmd.cpp @@ -39,10 +39,10 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/catalog_cache.h" -#include "mongo/s/commands/cluster_aggregate.h" #include "mongo/s/commands/cluster_commands_helpers.h" #include "mongo/s/commands/cluster_explain.h" #include "mongo/s/grid.h" +#include "mongo/s/query/cluster_aggregate.h" #include "mongo/s/query/cluster_find.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_pipeline_cmd.cpp b/src/mongo/s/commands/cluster_pipeline_cmd.cpp index ead254ff71f..1dd34a6d032 100644 --- a/src/mongo/s/commands/cluster_pipeline_cmd.cpp +++ b/src/mongo/s/commands/cluster_pipeline_cmd.cpp @@ -33,7 +33,7 @@ #include "mongo/base/status.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" -#include "mongo/s/commands/cluster_aggregate.h" +#include "mongo/s/query/cluster_aggregate.h" namespace mongo { namespace { diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript index ae0c24ad21e..415bca5d903 100644 --- a/src/mongo/s/query/SConscript +++ b/src/mongo/s/query/SConscript @@ -22,6 +22,34 @@ env.Library( ], ) +env.Library( + target='cluster_aggregate', + source=[ + 'cluster_aggregate.cpp', + 'cluster_aggregation_planner.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/pipeline/pipeline', + '$BUILD_DIR/mongo/s/query/cluster_client_cursor', + '$BUILD_DIR/mongo/db/pipeline/mongos_process_interface', + '$BUILD_DIR/mongo/db/views/views', + 'cluster_query', + ] +) + +env.CppUnitTest( + target="cluster_aggregate_test", + source=[ + "cluster_aggregate_test.cpp", + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/auth/saslauth', + '$BUILD_DIR/mongo/s/commands/cluster_command_test_fixture', + 'cluster_aggregate', + ], +) + env.CppUnitTest( target="cluster_find_test", source=[ diff --git a/src/mongo/s/commands/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index fbf2446467b..75d4db92668 100644 --- a/src/mongo/s/commands/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -30,7 +30,7 @@ #include "mongo/platform/basic.h" -#include "mongo/s/commands/cluster_aggregate.h" +#include "mongo/s/query/cluster_aggregate.h" #include <boost/intrusive_ptr.hpp> #include <mongo/rpc/op_msg_rpc_impls.h> @@ -42,7 +42,6 @@ #include "mongo/db/curop.h" #include "mongo/db/logical_clock.h" #include "mongo/db/operation_context.h" -#include "mongo/db/pipeline/cluster_aggregation_planner.h" #include "mongo/db/pipeline/document_source_change_stream.h" #include "mongo/db/pipeline/document_source_merge_cursors.h" #include "mongo/db/pipeline/document_source_out.h" @@ -61,6 +60,7 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/commands/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#include "mongo/s/query/cluster_aggregation_planner.h" #include "mongo/s/query/cluster_client_cursor_impl.h" #include "mongo/s/query/cluster_client_cursor_params.h" #include "mongo/s/query/cluster_cursor_manager.h" diff --git a/src/mongo/s/commands/cluster_aggregate.h b/src/mongo/s/query/cluster_aggregate.h index d7c0071e3de..d7c0071e3de 100644 --- a/src/mongo/s/commands/cluster_aggregate.h +++ b/src/mongo/s/query/cluster_aggregate.h diff --git a/src/mongo/s/commands/cluster_aggregate_test.cpp b/src/mongo/s/query/cluster_aggregate_test.cpp index 7bd85b16fe7..7bd85b16fe7 100644 --- a/src/mongo/s/commands/cluster_aggregate_test.cpp +++ b/src/mongo/s/query/cluster_aggregate_test.cpp diff --git a/src/mongo/db/pipeline/cluster_aggregation_planner.cpp b/src/mongo/s/query/cluster_aggregation_planner.cpp index c9dcfaf2da3..cd110ca31ff 100644 --- a/src/mongo/db/pipeline/cluster_aggregation_planner.cpp +++ b/src/mongo/s/query/cluster_aggregation_planner.cpp @@ -28,7 +28,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/pipeline/cluster_aggregation_planner.h" +#include "mongo/s/query/cluster_aggregation_planner.h" #include "mongo/db/pipeline/document_source_limit.h" #include "mongo/db/pipeline/document_source_match.h" diff --git a/src/mongo/db/pipeline/cluster_aggregation_planner.h b/src/mongo/s/query/cluster_aggregation_planner.h index 3b3aaa63df4..3b3aaa63df4 100644 --- a/src/mongo/db/pipeline/cluster_aggregation_planner.h +++ b/src/mongo/s/query/cluster_aggregation_planner.h |