1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
# -*- mode: python -*-
Import("env")
Import("get_option")
env = env.Clone()
# These commands are linked both in MongoS and MongoD
env.Library(
target='shared_cluster_commands',
source=[
'flush_router_config_cmd.cpp',
'get_shard_map_cmd.cpp',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/commands',
'$BUILD_DIR/mongo/s/grid',
]
)
# These commands are linked in MongoS only
env.Library(
target='cluster_commands',
source=[
'batch_downconvert.cpp',
'cluster_abort_transaction_cmd.cpp',
'cluster_add_shard_cmd.cpp',
'cluster_add_shard_to_zone_cmd.cpp',
'cluster_available_query_options_cmd.cpp',
'cluster_balancer_collection_status_cmd.cpp',
'cluster_build_info.cpp',
'cluster_clear_jumbo_flag_cmd.cpp',
'cluster_coll_stats_cmd.cpp',
'cluster_collection_mod_cmd.cpp',
'cluster_commit_transaction_cmd.cpp',
'cluster_compact_cmd.cpp',
'cluster_control_balancer_cmd.cpp',
'cluster_count_cmd.cpp',
'cluster_create_cmd.cpp',
'cluster_create_indexes_cmd.cpp',
'cluster_current_op.cpp',
'cluster_data_size_cmd.cpp',
'cluster_db_stats_cmd.cpp',
'cluster_distinct_cmd.cpp',
'cluster_drop_cmd.cpp',
'cluster_drop_database_cmd.cpp',
'cluster_drop_indexes_cmd.cpp',
'cluster_enable_sharding_cmd.cpp',
'cluster_explain_cmd.cpp',
'cluster_explain.cpp',
'cluster_filemd5_cmd.cpp',
'cluster_find_and_modify_cmd.cpp',
'cluster_find_cmd.cpp',
'cluster_fsync_cmd.cpp',
'cluster_ftdc_commands.cpp',
'cluster_get_last_error_cmd.cpp',
'cluster_get_shard_version_cmd.cpp',
'cluster_getmore_cmd.cpp',
'cluster_index_filter_cmd.cpp',
'cluster_is_db_grid_cmd.cpp',
'cluster_hello_cmd.cpp',
'cluster_kill_op.cpp',
'cluster_killcursors_cmd.cpp',
'cluster_killoperations_cmd.cpp',
'cluster_list_collections_cmd.cpp',
'cluster_list_databases_cmd.cpp',
'cluster_list_indexes_cmd.cpp',
'cluster_list_shards_cmd.cpp',
'cluster_map_reduce_agg.cpp',
'cluster_map_reduce_cmd.cpp',
'cluster_merge_chunks_cmd.cpp',
'cluster_move_chunk_cmd.cpp',
'cluster_move_primary_cmd.cpp',
'cluster_multicast_cmd.cpp',
'cluster_netstat_cmd.cpp',
'cluster_passthrough_commands.cpp',
'cluster_pipeline_cmd.cpp',
'cluster_plan_cache_clear_cmd.cpp',
'cluster_profile_cmd.cpp',
'cluster_refine_collection_shard_key_cmd.cpp',
'cluster_remove_shard_cmd.cpp',
'cluster_remove_shard_from_zone_cmd.cpp',
'cluster_rename_collection_cmd.cpp',
'cluster_repl_set_get_status_cmd.cpp',
'cluster_reset_error_cmd.cpp',
'cluster_reshard_collection_cmd.cpp',
'cluster_rwc_defaults_commands.cpp',
'cluster_set_feature_compatibility_version_cmd.cpp',
'cluster_set_free_monitoring_cmd.cpp' if get_option("enable-free-mon") == 'on' else [],
'cluster_set_index_commit_quorum_cmd.cpp',
'cluster_shard_collection_cmd.cpp',
'cluster_shutdown_cmd.cpp',
'cluster_split_cmd.cpp',
'cluster_update_zone_key_range_cmd.cpp',
'cluster_user_management_commands.cpp',
'cluster_validate_cmd.cpp',
'cluster_whats_my_uri_cmd.cpp',
'cluster_write_cmd.cpp',
'document_shard_key_update_util.cpp',
'kill_sessions_remote.cpp',
's_read_write_concern_defaults_server_status.cpp',
'strategy.cpp',
'cluster_commands.idl',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/audit',
'$BUILD_DIR/mongo/db/auth/auth',
'$BUILD_DIR/mongo/db/auth/builtin_roles',
'$BUILD_DIR/mongo/db/auth/saslauth',
'$BUILD_DIR/mongo/db/commands',
'$BUILD_DIR/mongo/db/commands/core',
'$BUILD_DIR/mongo/db/commands/create_command',
'$BUILD_DIR/mongo/db/commands/current_op_common',
'$BUILD_DIR/mongo/db/commands/feature_compatibility_parsers',
'$BUILD_DIR/mongo/db/commands/kill_common',
'$BUILD_DIR/mongo/db/commands/list_databases_command',
'$BUILD_DIR/mongo/db/commands/map_reduce_parser',
'$BUILD_DIR/mongo/db/commands/profile_common',
'$BUILD_DIR/mongo/db/commands/rename_collection_idl',
'$BUILD_DIR/mongo/db/commands/server_status',
'$BUILD_DIR/mongo/db/commands/servers',
'$BUILD_DIR/mongo/db/commands/set_feature_compatibility_version_idl',
'$BUILD_DIR/mongo/db/commands/set_index_commit_quorum_idl',
'$BUILD_DIR/mongo/db/commands/shutdown_idl',
'$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/commands/write_commands_common',
'$BUILD_DIR/mongo/db/ftdc/ftdc_server',
'$BUILD_DIR/mongo/db/initialize_api_parameters',
'$BUILD_DIR/mongo/db/logical_session_cache_impl',
'$BUILD_DIR/mongo/db/pipeline/aggregation',
'$BUILD_DIR/mongo/db/query/command_request_response',
'$BUILD_DIR/mongo/db/query/map_reduce_output_format',
'$BUILD_DIR/mongo/db/read_write_concern_defaults',
'$BUILD_DIR/mongo/db/repl/speculative_authenticate',
'$BUILD_DIR/mongo/db/shared_request_handling',
'$BUILD_DIR/mongo/db/stats/api_version_metrics',
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/views/views',
'$BUILD_DIR/mongo/executor/async_multicaster',
'$BUILD_DIR/mongo/executor/async_request_executor',
'$BUILD_DIR/mongo/idl/server_parameter',
'$BUILD_DIR/mongo/rpc/client_metadata',
'$BUILD_DIR/mongo/s/cluster_last_error_info',
'$BUILD_DIR/mongo/s/mongos_topology_coordinator',
'$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_router_api',
'$BUILD_DIR/mongo/s/vector_clock_mongos',
'$BUILD_DIR/mongo/transport/message_compressor',
'$BUILD_DIR/mongo/transport/transport_layer_common',
'shared_cluster_commands',
]
)
env.CppUnitTest(
target="s_commands_test",
source=[
"cluster_aggregate_test.cpp",
"cluster_command_test_fixture.cpp",
"cluster_delete_test.cpp",
"cluster_distinct_test.cpp",
"cluster_find_and_modify_test.cpp",
"cluster_find_test.cpp",
"cluster_insert_test.cpp",
"cluster_update_test.cpp",
"document_shard_key_update_test.cpp",
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/auth/saslauth',
'$BUILD_DIR/mongo/db/pipeline/process_interface/mongos_process_interface_factory',
'$BUILD_DIR/mongo/s/query/cluster_aggregate',
'$BUILD_DIR/mongo/s/sharding_router_test_fixture',
'cluster_commands',
],
)
|