Skip to content

Commit a37a628

Browse files
bshteinfeldMongoDB Bot
authored andcommitted
SERVER-100326 CBR with heuristicCE jscore passthrough (#32023)
GitOrigin-RevId: 29d1ac6
1 parent c3b7d3b commit a37a628

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This is equivalent to the core suite, but runs with CBR with heursitic CE enabled.
2+
3+
test_kind: js_test
4+
selector:
5+
roots:
6+
- jstests/core/**/*.js
7+
- jstests/core_standalone/**/*.js
8+
exclude_files:
9+
# Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the
10+
# 'core' suite. Instead we run them against a 1-node replica set in the 'core_txns' suite.
11+
- jstests/core/txns/**/*.js
12+
# Queryable encryption is not supported on standalone.
13+
- jstests/core/query/queryable_encryption/**/*.js
14+
# Query settings are not supported on standalone.
15+
- jstests/core/query/query_settings/**/*.js
16+
17+
# CBR does not currently add plans to the plan cache. These tests examine the plan cache.
18+
- jstests/core/query/plan_cache/*.js
19+
- jstests/core/query/explain/explain_plan_cache.js
20+
- jstests/core/query/partial_index_logical.js
21+
- jstests/core/index/index_filter_commands.js
22+
- jstests/core/index/index_filter_commands_invalidate_plan_cache_entries.js
23+
24+
# Asserting on specific plan, CBR pick different one
25+
- jstests/core/query/agg_hint.js
26+
27+
# CBR picks a different plan which results in different results due to SERVER-23229
28+
- jstests/core/query/project/projection_dotted_paths.js
29+
30+
# CBR chooses plan with SORT and hits memory limit
31+
- jstests/core/query/sort/sortg.js
32+
33+
# Asserts on output of allPlansExecution. CBR picks a single plan so there is no multiplanning.
34+
- jstests/core/query/explain/explain_winning_plan.js
35+
36+
# TODO SERVER-100144
37+
- jstests/core/query/elemmatch/elemmatch_or_pushdown.js
38+
# TODO SERVER-100417
39+
- jstests/core/query/explain/explain_multi_plan_count.js
40+
# TODO SERVER-99956
41+
- jstests/core/query/json_schema/*.js
42+
- jstests/core/timeseries/write/timeseries_update_arbitrary_updates_not_enabled.js
43+
# TODO SERVER-92589: Fails in all feature flags variant because SBE explain not supported
44+
- jstests/core/query/index_deduplication.js
45+
- jstests/core/query/explain/explain_all_plans_execution_stats.js
46+
- jstests/core/query/explain/explain_multi_plan.js
47+
48+
exclude_with_any_tags:
49+
# Profiler entries will have different shape in CBR
50+
- requires_profiling
51+
executor:
52+
config:
53+
shell_options:
54+
crashOnInvalidBSONError: ""
55+
objcheck: ""
56+
eval: |
57+
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
58+
fixture:
59+
class: MongoDFixture
60+
mongod_options:
61+
set_parameters:
62+
enableTestCommands: 1
63+
planRankerMode: "heuristicCE"

etc/evergreen_yml_components/tasks/resmoke/server_divisions/query/tasks.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,19 @@ tasks:
18991899
vars:
19001900
suite: query_tester_manual_test
19011901

1902+
- <<: *task_template
1903+
name: query_cbr_heuristic_jscore_passthrough
1904+
tags: [
1905+
"assigned_to_jira_team_server_query_optimization",
1906+
"experimental",
1907+
"blocked_in_query_alias", # We explicitly specify this task in query alias
1908+
]
1909+
commands:
1910+
- func: "do setup"
1911+
- func: "run tests"
1912+
vars:
1913+
suite: query_cbr_heuristic_jscore_passthrough
1914+
19021915
################################################
19031916
# Query Integration tasks #
19041917
################################################

etc/evergreen_yml_components/variants/amazon/test_dev_master_branch_only.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ buildvariants:
350350
- name: noPassthroughWithMongod_gen
351351
- name: initial_sync_fuzzer_sanity_patch
352352
- name: rollback_fuzzer_sanity_patch
353+
- name: query_cbr_heuristic_jscore_passthrough
354+
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
353355

354356
- <<: *amazon_linux2_arm64_static_compile_variant_dependency
355357
name: amazon_linux2_arm64_static-try-sbe-engine-query-patch-only

src/mongo/db/query/cost_based_ranker/cardinality_estimator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,8 @@ CEResult CardinalityEstimator::estimate(const MatchExpression* node, const bool
335335
ceRes = estimate(static_cast<const ElemMatchValueMatchExpression*>(node), isFilterRoot);
336336
break;
337337
case MatchExpression::ELEM_MATCH_OBJECT:
338-
ceRes =
339-
estimate(static_cast<const ElemMatchObjectMatchExpression*>(node), isFilterRoot);
340-
break;
338+
// TODO SERVER-100293
339+
return Status(ErrorCodes::UnsupportedCbrNode, "elemMatchObject supported");
341340
default:
342341
MONGO_UNIMPLEMENTED_TASSERT(9586708);
343342
}

0 commit comments

Comments
 (0)