summaryrefslogtreecommitdiff
path: root/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml')
-rw-r--r--buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml94
1 files changed, 94 insertions, 0 deletions
diff --git a/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml b/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml
new file mode 100644
index 00000000000..77b6e83f02a
--- /dev/null
+++ b/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml
@@ -0,0 +1,94 @@
+test_kind: js_test
+description: |
+ This suite enables the collection of query stats metrics on a mongos server, then runs the tests in
+ core and aggregation as normal. This should cause each query to compute a query
+ shape and query stats key, and record in-memory some metrics like execution time and number of
+ scanned documents. Then it uses the 'RunQueryStats' hook to collect the query stats at the end of
+ each test, once with HMAC application enabled and once without. It doesn't assert anything about
+ the collected query stats, it is just meant to make sure nothing is going seriously awry (e.g.
+ crashing).
+
+selector:
+ roots:
+ - jstests/core/**/*.js
+ exclude_files:
+ - jstests/core/txns/**/*.js
+ # The following tests fail because a certain command or functionality is not supported on
+ # mongos. This command or functionality is placed in a comment next to the failing test.
+ - jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
+ - jstests/core/**/check_shard_index.js # checkShardingIndex.
+ - jstests/core/**/collection_truncate.js # emptycapped.
+ - jstests/core/**/compact_keeps_indexes.js # compact.
+ - jstests/core/**/currentop.js # uses fsync.
+ - jstests/core/**/dbhash.js # dbhash.
+ - jstests/core/**/dbhash2.js # dbhash.
+ - jstests/core/**/fsync.js # uses fsync.
+ - jstests/core/**/geo_s2cursorlimitskip.js # profiling.
+ - jstests/core/**/geo_update_btree2.js # notablescan.
+ - jstests/core/**/index9.js # "local" database.
+ - jstests/core/**/queryoptimizera.js # "local" database.
+ - jstests/core/**/stages*.js # stageDebug.
+ - jstests/core/**/startup_log.js # "local" database.
+ - jstests/core/**/top.js # top.
+ # The following tests fail because mongos behaves differently from mongod when testing certain
+ # functionality. The differences are in a comment next to the failing test.
+ - jstests/core/**/explain_missing_database.js # Behavior with no db different on mongos.
+ - jstests/core/**/geo_2d_explain.js # executionSuccess in different spot in explain().
+ - jstests/core/**/geo_s2explain.js # inputStage in different spot in explain().
+ - jstests/core/**/geo_s2sparse.js # keysPerIndex in different spot in validate().
+ - jstests/core/**/operation_latency_histogram.js # Stats are counted differently on mongos, SERVER-24880.
+ - jstests/core/**/killop_drop_collection.js # Uses fsyncLock.
+ - jstests/core/**/or_to_in.js # queryPlanner in different spot in explain()
+ # The following tests fail because of divergent dropCollection behavior between standalones and
+ # sharded clusters. These tests expect a second drop command to error, whereas in sharded clusters
+ # we expect a second drop to return status OK.
+ - jstests/core/**/explain_upsert.js
+ # TODO SERVER-94818 Re-enable this test in query stats passthroughs.
+ # Query stats changes the error code expected by this test due to how it propagates parsing
+ # errors in test environments.
+ - jstests/core/json_schema/misc_validation.js
+ # SERVER-94231 These tests are excluded because query stats changes the error code that
+ # certain queries return. Specifically, queries that a) end in error and b) pass through
+ # mongos end up erroring in the query stats makeKey() callback. Query stats propagates the
+ # error with a different code, which makes the test fail. This behavior only exists pre-8.0,
+ # so we don't care to address this more robustly.
+ - jstests/core/list_all_sessions.js
+ - jstests/core/collation.js
+ - jstests/core/timeseries/timeseries_explicit_unpack_bucket.js
+ - jstests/core/sample_rate.js
+ - jstests/core/sort_with_meta_operator.js
+ - jstests/core/geonear_key.js
+ - jstests/core/timeseries/timeseries_streaming_group.js
+ - jstests/core/timeseries/timeseries_internal_bucket_geo_within.js
+ exclude_with_any_tags:
+ - assumes_standalone_mongod
+ - assumes_against_mongod_not_mongos
+ # system.profile collection doesn't exist on mongos.
+ - requires_profiling
+ # Running $queryStats will increment these counters which can screw up some test assertions.
+ - inspects_command_opcounters
+
+executor:
+ archive:
+ hooks:
+ - ValidateCollections
+ hooks:
+ # Be sure to run the hooks which depend on the fixture being alive before the CleanEveryN hook.
+ # That way the fixture restart can't cause any trouble for the other hooks.
+ - class: RunQueryStats
+ - class: ValidateCollections
+ - class: CleanEveryN
+ n: 20
+ fixture:
+ class: ShardedClusterFixture
+ mongos_options:
+ set_parameters:
+ enableTestCommands: 1
+ internalQueryStatsRateLimit: -1
+ internalQueryStatsErrorsAreCommandFatal: true
+ mongod_options:
+ set_parameters:
+ enableTestCommands: 1
+ num_rs_nodes_per_shard: 1
+ enable_sharding:
+ - test