Compare commits

...

199 Commits
master ... v7.2

Author SHA1 Message Date
Maria Prinus
e84abb9212 Revert "SERVER-84420: Remove unnecessary tasserts."
This reverts commit dd42977758.
2024-06-05 18:52:54 -07:00
Sandeep Dhoot
dd42977758 SERVER-84420: Remove unnecessary tasserts.
GitOrigin-RevId: 0ed764def55f8da546d7f100244445f1fb4073bd
2024-05-30 23:10:44 +00:00
Adam Rayner
ba3b04db35 SERVER-83483 Improve OIDC Azure E2E Machine Flow Tests 2024-02-26 17:41:45 +00:00
Kshitij Gupta
623568a184 SERVER-86873: Exclude transitionFromDedicatedConfigServer test case on 7.2 2024-02-22 01:23:15 +00:00
Jordi Serra Torrens
864ace1cd2 SERVER-84723 Ensure sharding catalog is valid when acquiring collections in multi-document transactions (#18193) 2024-02-22 00:37:41 +00:00
Max Hirschhorn
d5504a260e SERVER-86481 Run Jepsen set, register, read concern majority tests.
Introduces a testing-only Ubuntu 18.04 build variant until Jepsen
dependencies are installed on a modern Evergreen distro.
2024-02-13 21:00:13 +00:00
henrikedin
42050f3c2c SERVER-84336 Fix synchronization of timeseries unordered insertMany when exception is encountered and the thread has multiple write batches (#18099)
SERVER-84336 Fix exception handling of time-series unordered insert many
with multiple write batches

Threads now attempt to abort any write batches and wait until no other
thread is trying to commit the data before proceeding with tearing down
the command when an exception is encountered.

(cherry picked from commit bc1b48cc91e7ea05c96f7fb8f4ae2a905baeddab)
2024-02-09 19:14:35 +00:00
Alex Neben
65aefb50de SERVER-86381 Deleted staging file since it was unused in v7.2 2024-02-08 01:03:52 +00:00
dylrich
ebd0a99642
SERVER-86363: Make container registry login silent (#18792) 2024-02-07 22:56:09 +00:00
Kshitij Gupta
5f15dd43c6 SERVER-84548: Re-add transition to catalog shard feature flag and use
CSCCL.
2024-02-07 21:01:09 +00:00
Ahmad Shah
4c279dae59
SERVER-85792 - Backport new perf variants to v7.2 (#18529) 2024-02-06 19:19:26 +00:00
Parker Felix
49b42cd03b
SERVER-86165 Backport: Avoid stepdowns in merge_command_options.js (#18724) 2024-02-06 16:43:12 +00:00
Ahmad Shah
0cc86bbe00
SERVER-86081: Include redacted secrets in expansions.write for dsi in 7.2 (#18627) 2024-02-05 18:51:57 +00:00
Charlie Swanson
ddaeb72a9a SERVER-85694 Ability to parse serialized output for $searchMeta
(cherry picked from commit ea677d2a0a)
2024-02-02 18:20:06 +00:00
Pierlauro Sciarelli
10e283f1df SERVER-83454 Explicitly deregister range deletion tasks rather than relying on onCommit handler (#17803) 2024-02-02 18:18:15 +00:00
Nandini Bhartiya
42a7b48950 Revert "SERVER-84463: Replace withOneStaleConfigRetry with shardVersionRetry (#18252)"
This reverts commit 34dccfb046c91c44a1622dfc054e4b1fdaa19d23.
2024-02-01 16:48:40 +00:00
mongodb-matthew-normyle
ac5c97c2bd
SERVER-85959: Remove streams benchmarks from v7.2 release branch (#18517) 2024-01-31 17:45:29 +00:00
Jordi Serra Torrens
f003cf74df SERVER-82353 Detect placement conflicts in multi-document transactions due to move primary (#17826)
(cherry picked from commit 7c91dbccd67012a190c44ad801255c64eb54885d)
2024-01-31 16:57:04 +00:00
Drew Paroski
9cb7c37160 SERVER-84274 Make InListData sort and dedup its elements up-front
(cherry picked from commit 5ca5fc25ef24c4d661de66ab0765dca523969f13)
(cherry picked from commit 1b35becc32d3f54d5f962ae38f7791c3e1fea982)
2024-01-29 21:53:56 +00:00
Suganthi Mani
ed8e337445 SERVER-85836 TenantFileImporter service skips the feature document while iterating through the donor mdb_catlog table. (#18444)
(cherry picked from commit f6698560cf818fa8527614205353e290910096ee)
2024-01-29 20:34:15 +00:00
fotiniAlvanaki
c89e873f62 SERVER-85776 Disable facet_stats in replicated settings (#18417)
(cherry picked from commit 85bd68e177be9d3df9fc7d559ca5f406f2f7fe3b)
2024-01-29 18:13:41 +00:00
roganamy
1e5862e22e
SERVER-85652: Update DSI atlas azure tasks to use an AL2 compile artifact. (#18374) 2024-01-26 10:17:43 +00:00
nandinibhartiyaMDB
c66cf16a35 SERVER-84463: Replace withOneStaleConfigRetry with shardVersionRetry (#18252)
(cherry picked from commit 34dccfb046c91c44a1622dfc054e4b1fdaa19d23)
2024-01-25 22:01:01 +00:00
Alya Berciu
7d7723170d SERVER-84137 Robustify batched_multi_deletes_with_write_conflicts.js 2024-01-25 13:03:42 +00:00
John Daniels
d3bc4598a9
SERVER-85306: Don't use git URLs for modules. (#18311) 2024-01-24 18:44:23 +00:00
fotiniAlvanaki
5973ecad37 SERVER-84186 Add TimeseriesTsbsExpressionQuery in perf_tasks (#17602)
(cherry picked from commit 4af026ddcda3a82d7e4e4f47b07aa0b30db48c31)

SERVER-84186 Add tsb-expression-query to more variants (#18134)

(cherry picked from commit 1c4243298deaadffd9183f9f2a898d43f53c0af8)
2024-01-22 15:06:24 +00:00
Luke Chen
50d2d668f1 Import wiredtiger: be4538d91a80cd5dbe3a3a78315ba298a71336f0 from branch mongodb-7.2
ref: db2c6172da..be4538d91a
for: 7.2.1

WT-12110 Disable timestamp_abort backup tests in the compatibility mode
2024-01-19 03:24:43 +00:00
Luke Chen
f88a0d646c Import wiredtiger: db2c6172daad8abbb797d79bec240191dc292b63 from branch mongodb-7.2
ref: 62556c5502..db2c6172da
for: 7.2.1

WT-11062 Safe free the ref addr to allow concurrent access
2024-01-19 03:24:43 +00:00
Luke Chen
28b37361bb Import wiredtiger: 62556c5502131aa8ccc07e7efe199d46d382c6bd from branch mongodb-7.2
ref: 2ed7df7753..62556c5502
for: 7.2.1

WT-11669 Create new log record for backup ids (v7.2 backport)
2024-01-19 03:24:43 +00:00
Luke Chen
b77129f417 Import wiredtiger: 2ed7df77536ddc5bb3f7e350624457de2d5c264b from branch mongodb-7.2
ref: 681b86d970..2ed7df7753
for: 7.2.1

WT-12099 Check racing threads in mmap.
2024-01-19 03:24:43 +00:00
Luke Chen
b8a3043436 Import wiredtiger: 681b86d9700a99c68de3795f6885bf122fdb1055 from branch mongodb-7.2
ref: d9a3c752af..681b86d970
for: 7.2.1

WT-12043 Remove obsolete HAVE_DIAGNOSTIC ifdefs to avoid memory leak.
2024-01-19 03:24:43 +00:00
Luke Chen
cc41f4b58e Import wiredtiger: d9a3c752af413e58af9f8293a629ba00595ab12c from branch mongodb-7.2
ref: 5befa70cfa..d9a3c752af
for: 7.2.1

WT-11987 Modify the metadata base tracking to detect corruption better.
2024-01-19 03:24:43 +00:00
Luke Chen
3f419bd96c Import wiredtiger: 5befa70cfa53bdaaef312076678532f78e0bcd65 from branch mongodb-7.2
ref: 832185e230..5befa70cfa
for: 7.2.1

WT-11845 Fix transaction visibility issue with truncate
2024-01-19 03:24:43 +00:00
Daniel Moody
3320dc10c6 SERVER-84502 prevent package release testing on non master evergreen projects (#17850)
(cherry picked from commit 99ab315f142a4e42109d9643885b3b9e28a47f26)
2024-01-18 20:58:25 +00:00
Kevin Cherkauer
e26f9f583d SERVER-84595 Delete invalid test out_majority_read_replset.js (#17902)
GitOrigin-RevId: fe34d60c344d8bdda69cdaa05cf4beee3188ce5c
2024-01-18 20:17:01 +00:00
Patrick Freed
c60fe31709 SERVER-84241 Fix deadlock when AsioTransportLayer::stopAcceptingSessions is called before listener thread is active (#17636) 2024-01-18 13:06:50 +00:00
Peter Volk
76530ad3f5 SERVER-83119 Qualify a ClusteredIndexscan as an allowed operation when notablescan is set 2024-01-18 11:58:53 +00:00
Santiago Roche
296a154a66 SERVER-81313: Improve query shape generation for ResumeToken.
(cherry picked from commit c8b9f57f6d)
2024-01-17 22:57:10 +00:00
James Bronsted
fc89387fd3 SERVER-85263 report escaped client application name
(cherry picked from commit fe73bee70f25c77ef5c8f420a4e345301fd0977e)
2024-01-17 20:42:21 +00:00
Santiago Roche
6aceebd35e SERVER-83534: Provide support for custom serialization on fields with "query_shape: custom"
(cherry picked from commit b941555010)
2024-01-17 18:18:01 +00:00
Gregory Noma
d0121a10d1 SERVER-83337 Wait for idents to be dropped in size storer cleanup test (#18037)
(cherry picked from commit 674ef2484dc319019bb11f15a198670437f67c02)
2024-01-16 21:38:37 +00:00
Jiawei Yang
a75ef096be SERVER-84731 not taking RSTL when waiting lastStableRecoveryTimestamp in resharding query (#17980)
GitOrigin-RevId: 8b277830cad843c512a891ebd19295cefab56371
2024-01-16 20:06:20 +00:00
Ben Shteinfeld
c6e4ede5cc SERVER-84338 Avoid $or->$in rewrite if operand is a parameter (2nd attempt) (#17992) 2024-01-16 19:16:20 +00:00
Rui Liu
27f9a614d7 SERVER-82815 Implement expression $_internalKeyStringValue
(cherry picked from commit d3c0fa0caad7ba07c53669fc3247a6560fe8fc7f)
2024-01-15 13:23:05 +00:00
Tommaso Tocci
e3098d7ab7 SERVER-82365 Optimize the construction of the balancer's collection distribution status histogram (2nd attempt) (#17653) 2024-01-14 12:49:20 +00:00
Moustafa Maher Khalil
6ebac6e589 SERVER-80363 server default writeConcern is not honored when wtimeout is set 2024-01-13 12:34:33 +00:00
Tommaso Tocci
ee76004c67 SERVER-83580 Re-introduce balancer policy unittests with multiple chunks 2024-01-12 21:31:08 +00:00
Wenqin Ye
4eff4f8ec4 SERVER-77667: Prevent mongos from starting new transactions at shutdown 2024-01-12 20:48:22 +00:00
Will Buerger
d35fa28697 SERVER-84567: writeQueryStats logs an error rather than uassert when the feature is disabled 2024-01-12 19:58:12 +00:00
Irina Yatsenko
07c97453b2 SERVER-84130 Do not use bucket-level filter with non-type-bracketing LT(E) comparisons (#17620)
(cherry picked from commit eb7ce93bd252534d949f8f21716c0b3b9b0e0e0c)
2024-01-12 00:05:09 +00:00
Brett Nawrocki
021318eaa1 SERVER-84738 Fix Data Race in ReshardingCollectionCloner
(cherry picked from commit 3c0ca3e82de5364d031d1bdd9b9c52be0e1f3743)
2024-01-11 23:22:32 +00:00
Spencer Jackson
5dceac6f12 SERVER-84063 Remove Black Duck from Security Daily Cron
(cherry picked from commit 56f00b8cbee00e685e916855906d3d9dfc44c506)
2024-01-11 19:09:16 +00:00
Ruoxin Xu
1267d6ba5c SERVER-84369 Avoid auto-parameterizing the infinity value in a query (#17867)
(cherry picked from commit 99853e7a9c71d793b5b3c5028e322bf0215d2697)
2024-01-11 15:42:05 +00:00
Ben Shteinfeld
43ad100347 Revert "SERVER-84338 Avoid $or->$in rewrite if operand is a parameter (#17885)"
This reverts commit 375c60714f.
2024-01-11 14:58:34 +00:00
Adityavardhan Agrawal
e1ad3540f8 SERVER-83685 Make trySbeRestricted the default query knob
(cherry picked from commit 46d85fa95b7e3a6e3565ddb2be4a793d4bfbf9a9)
2024-01-11 12:20:19 +00:00
Ben Shteinfeld
375c60714f SERVER-84338 Avoid $or->$in rewrite if operand is a parameter (#17885)
(cherry picked from commit b96ac705e7c6801d9ecfd7b879dc9819060982fe)
2024-01-10 20:55:34 +00:00
Gregory Noma
8b8bcfc57e SERVER-83369 Enforce type of bucketSize on index creation (#17846)
(cherry picked from commit 65c35f63bc676fe40986e45bd0eafe22fcbdecd8)
2024-01-10 20:13:17 +00:00
Mariano Shaar
5b36aec57c SERVER-81994 $densify range doesn't re-parse correctly 2024-01-10 03:12:48 +00:00
Mariano Shaar
ca759068b2 SERVER-81496 Weird shapification behavior for $convert/$toString 2024-01-10 01:58:11 +00:00
egol
84158eedd7 SERVER-81517 blacklist validate_db_metadata_command.js from migrations suite 2024-01-08 12:39:08 +00:00
egol
d69e945af5 SERVER-82791 createView fails with StaleConfig if a sharded collection already exists with the same namespace 2024-01-08 12:38:01 +00:00
Paolo Polato
38498d0d5a SERVER-81508 Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.
(cherry picked from commit bec596c52e)
2024-01-08 11:55:40 +00:00
Foteini Alvanaki
bc2d813e90 SERVER-82197 Handle collation in KeyString in case of Object/array
(cherry picked from commit 9af9ff389e464faa970d89b07c2d3da8e5992a63)
2024-01-08 11:12:17 +00:00
Adityavardhan Agrawal
aa6d61bdd4 SERVER-83470 Introduce internalQueryFrameworkControl trySbeRestricted
(cherry picked from commit ae8b6ced5a)
2024-01-08 08:35:50 +00:00
Luke Chen
69a927d276 Import wiredtiger: 832185e230d7de80f3830d1adac90e3553fa92cb from branch mongodb-7.2
ref: c9391a4ae5..832185e230
for: 7.2.1

WT-11911 Fix use-after-free with bounded cursor and search_near
2024-01-08 03:57:49 +00:00
Luke Chen
cca06f05c7 Import wiredtiger: c9391a4ae5809d57b93e85e192dd0dc2362273c3 from branch mongodb-7.2
ref: a7b015720a..c9391a4ae5
for: 7.2.1

WT-12092 Avoid hardcoded version number in dockerfile
2024-01-08 03:57:49 +00:00
Luke Chen
0e3df3f3f5 Import wiredtiger: a7b015720a76b124757b08648d041a941e856dd0 from branch mongodb-7.2
ref: 8d05c81de6..a7b015720a
for: 7.2.1

WT-12147 Temporarily disable clang-analyzer
2024-01-08 03:57:49 +00:00
Luke Chen
653620967d Import wiredtiger: 8d05c81de660d0c840092d733469af677d9ae18e from branch mongodb-7.2
ref: 23d285ace2..8d05c81de6
for: 7.2.1

WT-12100 Fix csuite-long-running timeout with MSan
2024-01-08 03:57:49 +00:00
Luke Chen
f157e37b49 Import wiredtiger: 23d285ace28bf2cc2585a40b74f00421e1ea45ef from branch mongodb-7.2
ref: 4d1fae350b..23d285ace2
for: 7.2.1

WT-12036 Add Windows-specific scheduling workaround when locking dhandles
2024-01-08 03:57:49 +00:00
Patrick Freed
44f9d1c74a SERVER-82676: gRPC unit tests reuse port, causing conflicts with concurrently running tests 2024-01-05 19:00:25 +00:00
Juan Gu
718fee1111 SERVER-83866 Update BACKPORTS_REQUIRED_BASE_URL from mongodb/mongo to… (#17380)
(cherry picked from commit 579c166256cfe8a76081ae71b095b7a4c105d252)
2024-01-05 06:47:50 +00:00
Daniel Moody
a2ba3b6f23 SERVER-84546 switch static linked asan tests to dynamic link (#17881)
(cherry picked from commit 295bbb6bad345709d6abdfabe9d5bb705497f2b5)
2024-01-05 00:36:54 +00:00
Nandini Bhartiya
c55a549d9d SERVER-79486: Increase the cardinality of the new shard key.
(cherry picked from commit 045c7112df)
2024-01-04 20:21:34 +00:00
Gil Alon
15ebafa116 SERVER-83003 Throw atlas not configured error when listSearchIndexes is not run using the StubMongoProcessInterface
GitOrigin-RevId: df3b685a62501daa39a3ccf7fdc130273bd55d6a
(cherry picked from commit 6f8f63baac)
2024-01-04 15:48:37 +00:00
Gil Alon
a5a233d288 SERVER-82929 Add parse function and testing infrastructure for listSearchIndexes privilege action
(cherry picked from commit 240d84a469)
2024-01-04 15:48:37 +00:00
Ben Shteinfeld
420c9fe474 SERVER-84013 Avoid invoking MatchExpression::optimize() on children of
$or in the subplanner.

The subplanner invokes the query planner for each branch of a rooted
$or. Doing this requires constructing a CanonicalQuery representing a
single branch of the $or. A side-effect of cosntructing a CanonicalQuery
is that the MatchExpression is optimized. The subplanner assumes that
both of these MatchExpressions are identical and makes decisions about
index bounds based on the order of predicates in the MatchExpression.
There are queries (as demostrated in the regression test this patch
introduces) for which this assumption is not true and leads to
incorrect index bounds and thus results.

This patch fixes the bug by ensuring that the subplanner does not
invoke MatchExpression optimization a second time when constructing a
copy of the children of the $or.

(cherry picked from commit ac1c1f25667e0845964b61cb6aadca648485d54c)
2024-01-03 20:06:33 +00:00
Benety Goh
7e734baf4a SERVER-83825 increase log verbosity of write conflict retry messages in index build resource consumption test
This supports debugging unexpected operation metric counts that may be caused by write conflicts in the server.

(cherry picked from commit e4142468d747fbb9865d0ec691c70b0f538ea474)
2024-01-03 18:57:15 +00:00
Shin Yee Tan
bb271f981b SERVER-82967 Unregister index builds that fail during set up
(cherry picked from commit 21a401277c)
2024-01-03 16:54:55 +00:00
Robert Sander
d33e034935 SERVER-84087 Make sure the ExecutorPool gets terminated after joining the migration util executor
(cherry picked from commit fbcc593e99ee8178295c1cd0808ad775d3e01b90)
2024-01-03 14:00:15 +00:00
Silvia Surroca
40808dc197 SERVER-84468 Fix deadlock when running runTransactionOnShardingCatalog() (#17821)
(cherry picked from commit 30410c6458fc965ae1277e78a2313e59a4e5d24f)
2024-01-03 13:18:02 +00:00
Ivan Fefer
08e0afda8c SERVER-83492 Remove limit and skip values from SBE plan cache key if possible 2024-01-03 10:47:32 +00:00
Benety Goh
11be180980 SERVER-83830 clean up StorageEngine::getSanitizedStorageOptionsForSecondaryReplication() return type
(cherry picked from commit 667e21d6f22213031d46f5e50ba9ee9e51e88d3e)
2024-01-03 00:04:36 +00:00
Benety Goh
13430e3663 SERVER-83830 add js test for checking in-memory config strings at collection creation
(cherry picked from commit 25fac641ec970cbdc55238769a1f2743bfb3408b)
2024-01-02 23:28:41 +00:00
Damian Wasilewicz
d31885ce2c SERVER-72703 Downgrade out's db lock to IX 2024-01-02 22:46:45 +00:00
Israel Hsu
f87abc7ddd SERVER-82313 Uses proper TaskExecutor for canceling txn 2024-01-02 22:45:39 +00:00
Benety Goh
d7265c37d7 SERVER-83830 preserve non-WT when sanitizing storage engine options
GitOrigin-RevId: abdd1a29d1a72a4bbf92f0da3dfdda7214a0c644
(cherry picked from commit e2c97b7b9f)
2024-01-02 22:01:06 +00:00
Brett Nawrocki
938fd79005 SERVER-82822 Remove Bad Invariant in RetryUntilMajorityCommit
(cherry picked from commit 213386fd2a)
2024-01-02 21:18:26 +00:00
Brad Cater
99b38e174b SERVER-84353 Make read ticket exhaustion with stepDown test less flaky (v7.2) 2024-01-02 20:34:25 +00:00
Silvia Surroca
7dd7f83d41 SERVER-83874 Fix move primary operation doesn't drop db.system.views on the donor
(cherry picked from commit e5c597842397080d3c446a4535d5720f54e02835)
2024-01-02 17:11:47 +00:00
David Dominguez-Sal
923456a8c6 SERVER-82221: listCollections requests up to date information from the collection_catalog (backport SERVER-82221 and SERVER-84176) 2024-01-02 14:36:37 +00:00
Pol Pinol Castuera
3b66c10d2c SERVER-82706 check_metadata_consistency.js should use retriable writes when contacting config server
(cherry picked from commit 494690bc71)
(cherry picked from commit cdcf4625da)
2024-01-02 10:18:25 +00:00
Pierlauro Sciarelli
3da705246c SERVER-83775 Do not balance data between shards owning more than the ideal data size 2023-12-29 15:14:49 +00:00
Ivan Fefer
5efa3822ad SERVER-83777 Cap $in size in plan cache with internalQueryMaxScansToExplode 2023-12-29 12:38:31 +00:00
Ivan Fefer
9ceb1e17d4 SERVER-83959 Correctly pass preparingFromCache argument
GitOrigin-RevId: 5cae2f2b7c55f47512258db4ab8c3b6afdd504e1
2023-12-29 11:57:51 +00:00
Patrick Freed
d322ecd542 SERVER-83766 Allow sessions to access their TransportLayer in SessionWorkflow benchmark 2023-12-28 20:41:46 +00:00
Britt Snyman
b93106f113 SERVER-82137 Bump commit for 7.2.0 GA 2023-12-14 22:25:05 +00:00
Gil Alon
31050ea313 SERVER-83763 Add test tag to restrict timeseries_project_pushdown from multiversion test suite
(cherry picked from commit cfa5d90375)
2023-12-01 21:46:05 +00:00
Kevin Cherkauer
7946a7738b SERVER-83764 Disable $search SBE pushdown in 7.2 to avoid SERVER-83519 2023-12-01 19:06:01 +00:00
Sara Golemon
954f559980 SERVER-83655 Restore admin.system.new_users to isLegalClientSystemNS
(cherry picked from commit 84ac88b596)
2023-12-01 18:20:08 +00:00
Trevor Guidry
fd5060e6b0 Revert "SERVER-75033 Capture core dumps from test failures on macOS"
This reverts commit 7bfc730dd6.
2023-11-30 16:24:25 +00:00
Juan Gu
f05aab4ac9 SERVER-83592 Add resmoke flag --enable_enterprise_tests enable enterprise js tests
(cherry picked from commit d463d338460a26792c33e173c7cd475535842812)
2023-11-29 00:04:38 +00:00
Mihai Andrei
05a36cbeb1 SERVER-83611 Acquire CRI in dispatchShardPipeline if none is present
(cherry picked from commit 7fa5d2bbdf)
2023-11-28 22:53:31 +00:00
Henrik Edin
931f33952a SERVER-82983 Fix compiler ambiguity with formatting DecimalCounter using libfmt
(cherry picked from commit c25d33c42c)
2023-11-28 21:08:09 +00:00
Suganthi Mani
43b6dffced SERVER-83097 Handle network exceptions in tenant_migration*recipient_access_blocker_rollback.js.
(cherry picked from commit 8f49e79b92)
2023-11-28 20:26:10 +00:00
Dan Larkin-York
bbd37770c5 SERVER-83485 Fix multikey-path serialization code used during validation
(cherry picked from commit 36ea8726cd)
2023-11-28 19:44:09 +00:00
Gregory Wlodarek
50d8c3b054 SERVER-83172 Update timeseries_create.js to insert compressed buckets
(cherry picked from commit 566ad4caee)
2023-11-28 18:21:48 +00:00
David Storch
f84e9c8325 SERVER-83091 Fix infinite loop in lockstep $or plan enumeration
(cherry picked from commit a36f67db89)
2023-11-28 17:26:16 +00:00
rakiz
a6081c332c SERVER-83461 Crash->throw on requiredToRunOnMongos/canRunOnMongos conflict
Since SERVER-65534 pipelines starting with the '$queue' stage must run on
mongoS when no 'CollectionRoutingInfo' is available. This, however, can
result in an invariant failure, because some pipelines starting with the
'$queue' stage may still not be allowed to run on mongoS.

In this fix we replace the invariant with a 'uassert', which was already
there, but did not cover the case introduced in SERVER-65534.
2023-11-28 16:47:32 +00:00
Drew Paroski
0e6b99c625 Revert "SERVER-80133 Update "sbe_stage_builder_filter.cpp" to generate ABT expressions" 2023-11-28 06:10:34 +00:00
Yuhong Zhang
13fd6af744 SERVER-82730 Convert invariants when decoding keystring RecordId to assertions
(cherry picked from commit bf607bda80)
2023-11-28 04:03:16 +00:00
Juan Gu
b4abd7d8c0 SERVER-82449 Optimize copybara sync behavior for specific no-change scenarios (#16427)
(cherry picked from commit c55308ba92)
2023-11-28 02:05:27 +00:00
Juan Gu
c1b99fd1e6 SERVER-82043 Enhancement of Commit Message Validation for 10gen/mongo Commits (#16160)
(cherry picked from commit 4dc9f17146)
2023-11-28 01:13:13 +00:00
Varun Ravichandran
299a153c8b SERVER-83257: Use atomic_load for all atomically exchanged shared_ptrs in OIDC subsystems
(cherry picked from commit 939d547f6b)
2023-11-28 00:27:46 +00:00
Drew Paroski
8f2e5f7c24 Revert "SERVER-81466 Improve how stage builder generates projections"
This reverts commit 875c2b933b.
2023-11-27 23:43:06 +00:00
Gregory Noma
7c00a3ea31 SERVER-76560 Honor expireAfterSeconds for time-series pre-2018
(cherry picked from commit 21b7b619ee)
2023-11-27 22:53:26 +00:00
Gregory Noma
fc635e4611 SERVER-79864 Disable TTL on time-series colls requiring extended range
(cherry picked from commit aa87caf6b2)
2023-11-27 22:53:26 +00:00
Foteini Alvanaki
4e9cfd72e7 SERVER-83567 Ignore missing values in classic window $push implementation
(cherry picked from commit b3d8b635d6)
2023-11-27 16:37:36 +00:00
Foteini Alvanaki
ae77de622a SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields 2023-11-24 19:19:01 +00:00
Pierlauro Sciarelli
29c5df5982 SERVER-82953 log original request when shardCollection operations conflict 2023-11-24 17:04:05 +00:00
Marcos José Grillo Ramirez
de3690dbb4 SERVER-81229 Add replay protection to clone command of move primary
(cherry picked from commit 8749786708)
2023-11-24 12:56:17 +00:00
Foteini Alvanaki
3fcf931221 Revert "SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields"
This reverts commit 99353dfe36.
2023-11-24 01:13:58 +00:00
Foteini Alvanaki
99353dfe36 SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields 2023-11-23 16:52:57 +00:00
Silvia Surroca
c5dde025da SERVER-81534 DDL locks musn't be acquired during step down or shutdown
(cherry picked from commit 1b6505db86)
2023-11-23 11:59:27 +00:00
Silvia Surroca
1bac640ee9 SERVER-81371 movePrimary may be retried indefinitely if it fails on clone phase and there are sharded views
(cherry picked from commit a7a3da9e34)
2023-11-23 11:11:10 +00:00
Aitor Esteve Alvarado
71a6143a0d SERVER-82073 Fix merge chunk command generation in collection_defragmentation.js
(cherry picked from commit 2ad5342fac)
2023-11-22 18:57:16 +00:00
Yu Jin Kang Park
ae2ab115ad SERVER-83168 Make index build entry removal after commit uninterruptible 2023-11-22 17:25:02 +00:00
Patrick Freed
ba9e77a55e SERVER-83279 Wait for server handler to complete in ServerSendsMultipleMessages test 2023-11-22 16:32:59 +00:00
Aitor Esteve Alvarado
6d12bf7945 SERVER-83161 Fix concurrent read to _errMsg from MigrationDestinationManager without acquiring mutex
(cherry picked from commit a082c2a139)
2023-11-22 15:18:02 +00:00
Yu Jin Kang Park
2b0d6ecb67 SERVER-82610 Fix setNewIndexBuildsBlocked not unset on setFCV interrupt 2023-11-22 13:46:02 +00:00
Maria Prinus
7a82a08a28 SERVER-83518 Remove streams_window_operator_bm test dependency 2023-11-22 00:08:29 +00:00
Trevor Guidry
7bfc730dd6 SERVER-75033 Capture core dumps from test failures on macOS
(cherry picked from commit d6072dc2c6)
2023-11-21 20:39:00 +00:00
Spencer Jackson
d8fc3a46a7 SERVER-78066 Enable feature flag for OIDC internal authorization
(cherry picked from commit db2cc86a07)
2023-11-21 03:57:36 +00:00
Erin Zhu
0ff87204ec SERVER-82889: Fix rate limiting for views 2023-11-20 23:19:35 +00:00
Adi Zaimi
ebe878ab31 SERVER-81164 Reduce test duration by sleeping less in the bg js hook
Reduce the duration of sleep() in the run_fcv_upgrade_downgrade_background.js background hook,
which is used in the fcf_upgrade_downgrade suites, which will result in tests and consequently the suite
to take an acceptable time to complete (similar to other test suites).
2023-11-20 20:59:37 +00:00
Mihai Andrei
b0c4a578f5 SERVER-79848 Unify null semantics for $_requestResumeToken and $_resumeAfter for both engines
(cherry picked from commit 022c8097ec)
2023-11-20 16:26:38 +00:00
Luke Chen
08f189fbb2 Import wiredtiger: 4d1fae350bcc5cd7aeafe5773b849778aa5dd226 from branch mongodb-7.2
ref: e3aa043c7b..4d1fae350b
for: 7.2.0-rc2

WT-11997 Revert "WT-11398 Refresh application thread snapshot when it performs eviction (#9765)"
2023-11-20 03:33:01 +00:00
Luke Chen
fc4878a46c Import wiredtiger: e3aa043c7b1a805ec79e5318dab2130198e2f7fe from branch mongodb-7.2
ref: a613341e2b..e3aa043c7b
for: 7.2.0-rc2

WT-11851 Extend existing compaction crash test with background compaction
2023-11-20 03:33:01 +00:00
Luke Chen
dcda39c85d Import wiredtiger: a613341e2bdd4558b1a3515c75c88edb6d1a4f7b from branch mongodb-7.2
ref: d409259e2b..a613341e2b
for: 7.2.0-rc2

WT-11992 Bump WiredTiger version to 11.3.0
2023-11-20 03:33:01 +00:00
Luke Chen
3445ac6f15 Import wiredtiger: d409259e2b3a6f49667a7db67890e67fe3220aa9 from branch mongodb-7.2
ref: 9a9ba13018..d409259e2b
for: 7.2.0-rc2

WT-11583 Remove long running C tests from sanitizers
2023-11-20 03:33:01 +00:00
Luke Chen
9b00268a46 Import wiredtiger: 9a9ba13018250cfc31253d3deb0c0504e6d7d926 from branch mongodb-7.2
ref: 4b37cbe4e3..9a9ba13018
for: 7.2.0-rc2

WT-11959 Don't increment cache_inmem_split statistic when split fails
2023-11-20 03:33:01 +00:00
Luke Chen
42b8ea55dd Import wiredtiger: 4b37cbe4e3992389e0bfb903ba8ca88791f6e4ca from branch mongodb-7.2
ref: 77859760c4..4b37cbe4e3
for: 7.2.0-rc2

WT-11787 Cut WiredTiger 11.2.0 release
2023-11-20 03:33:01 +00:00
Luke Chen
54b36bb8a8 Import wiredtiger: 77859760c4bb6a23f4a58b3fc5665832b72b5a45 from branch mongodb-7.2
ref: 818f80ea53..77859760c4
for: 7.2.0-rc2

WT-11615 Extend WT functional model to support checkpoints
2023-11-20 03:33:01 +00:00
Luke Chen
f544bcdc93 Import wiredtiger: 818f80ea53d3def562483403421b5e8ddf0df757 from branch mongodb-7.2
ref: d3edc778cd..818f80ea53
for: 7.2.0-rc2

WT-11953 Make sure pre-allocated log files exist at the start of every
2023-11-20 03:33:01 +00:00
Luke Chen
06cb115d89 Import wiredtiger: d3edc778cd1637240fc807c0922563cfeb3f8c8b from branch mongodb-7.2
ref: 92cffa566b..d3edc778cd
for: 7.2.0-rc2

WT-11970 Do not raise an error if background compaction is already enabled/disabled
2023-11-20 03:33:01 +00:00
Luke Chen
df5e058182 Import wiredtiger: 92cffa566bbd5a2979a4603f598af8c1ad42e9a8 from branch mongodb-7.2
ref: 3172dc6a05..92cffa566b
for: 7.2.0-rc2

WT-11724 Have the block manager retry chunk cache reads on checksum failure
2023-11-20 03:33:01 +00:00
Luke Chen
111e48d781 Import wiredtiger: 3172dc6a05fe902f2f9ce54a85ffc2c7797906d1 from branch mongodb-7.2
ref: da214af22b..3172dc6a05
for: 7.2.0-rc2

WT-11986 Fix missing script issue for the doc-update task
2023-11-20 03:33:01 +00:00
Luke Chen
fda88f523f Import wiredtiger: da214af22bbbbf5c4c83230a1967b18b087c582a from branch mongodb-7.2
ref: 95aad3b92e..da214af22b
for: 7.2.0-rc2

WT-9628 Mark the targeted btree as dirty to avoid forcing checkpoints when compacting
2023-11-20 03:33:01 +00:00
Luke Chen
169219d7b1 Import wiredtiger: 95aad3b92eae32dfe7a8302c387acbed633f94b4 from branch mongodb-7.2
ref: c25aa02acb..95aad3b92e
for: 7.2.0-rc2

WT-11971 Fix doc-update task and artifacts archiving
2023-11-20 03:33:01 +00:00
Varun Ravichandran
0b7c20a5c1 SERVER-82143: Allow clientID to be optionally omitted during identity provider configuration 2023-11-19 04:07:50 +00:00
Gil Alon
a9d61291eb SERVER-82447 Restrict project and addFields pushdown before unpack if an expression depends on the whole document
(cherry picked from commit 0d000e6617)
2023-11-17 20:45:29 +00:00
Alexander Ignatyev
387dd839a5 SERVER-83390 Disable Boolean simplifier 2023-11-17 20:05:08 +00:00
Haley Connelly
82801a0852 SERVER-81978 handle StorageUnavailableExceptions in repl::applyCommand_inlock()
(cherry picked from commit bc2e4b24b5)
2023-11-17 17:43:30 +00:00
Alice Doherty
a2290d4a5a SERVER-82708 [v7.2] Update variants used to performance test stable branches 2023-11-17 15:02:23 +00:00
Sara Golemon
35776226b7 SERVER-83141 Add TransportLayer API for stopping new inbound connections
(cherry picked from commit 3e2542d513)
(cherry picked from commit 8c4f73c405)
2023-11-16 21:07:06 +00:00
Louis Williams
2b2d11bae3 SERVER-82305 dbCheck should ignore prepare conflicts on secondaries
(cherry picked from commit 6007ed70a6)
2023-11-16 19:51:58 +00:00
Gregory Noma
fbb3c85865 SERVER-83336 Disable wt_size_storer_cleanup_replica_set.js on macOS
(cherry picked from commit 259698664f)
2023-11-16 18:48:27 +00:00
egol
b57eb500c7 SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary 2023-11-16 17:30:57 +00:00
Gregory Noma
7c9b028298 SERVER-33494 Remove size storer entry upon ident drop
(cherry picked from commit b4e5daaeb5)
2023-11-16 16:46:05 +00:00
Ian Boros
63e5c1ef09 SERVER-83273 Fix typo use-after-free bug in MakeObjSpec
(cherry picked from commit 4907aca9d4c9b43a45daddc387d8b64d46e431f0)
2023-11-16 14:39:51 +00:00
Aitor Esteve Alvarado
3b7e775ac5 SERVER-82685 Increase reshardingCriticalSectionTimeoutMillis for store_historical_placement_data.js
(cherry picked from commit 2d315c2035)
2023-11-16 11:05:39 +00:00
Allison Easton
12788d46a1 SERVER-81181 Enable featureFlagCheckForDirectShardOperations
(cherry picked from commit a4405631c2)
2023-11-16 08:37:55 +00:00
Erwin Pe
72e7ec8e6b SERVER-82984 Fix nModified value for queryable encrypted upserts
(cherry picked from commit d0c3d8916e)
2023-11-16 00:53:15 +00:00
Trevor Guidry
f0c87652c3 SERVER-83209 core_analyzer override rhel80-medium large distros
(cherry picked from commit cf162c1bae)
2023-11-15 09:14:07 +00:00
Trevor Guidry
197f3769aa SERVER-83206 Fix otel python deps on s390x, ppc, and macos
(cherry picked from commit 97fd77b7c1)
2023-11-15 05:06:10 +00:00
Luke Chen
81e25d61e7 Import wiredtiger: c25aa02acb695dc2da594ec92d21d4e55c9d7b15 from branch mongodb-7.2
ref: f21876bf42..c25aa02acb
for: 7.2.0-rc2

WT-11897 Split the long running tests into two test tasks
2023-11-15 02:04:06 +00:00
Luke Chen
73f59e1e33 Import wiredtiger: f21876bf42175bbeddcf24be877f6c3643caf3b8 from branch mongodb-7.2
ref: babf6984fb..f21876bf42
for: 7.2.0-rc2

WT-11885 Apply Github Apps for the doc-update task
2023-11-15 02:04:06 +00:00
Luke Chen
465b7573fa Import wiredtiger: babf6984fb12eeb800a939091a0ddc3929d2c47e from branch mongodb-7.2
ref: 9fabeef165..babf6984fb
for: 7.2.0-rc2

WT-11958 Fix the test test_app_thread_evict01 and turn on
2023-11-15 02:04:06 +00:00
Luke Chen
00842fd435 Import wiredtiger: 9fabeef165a9b81ad68ed44ef3a313e329773acf from branch mongodb-7.2
ref: f84cde5b5a..9fabeef165
for: 7.2.0-rc2

WT-11888 Fix Evergreen Python version detection on macOS
2023-11-15 02:04:06 +00:00
Luke Chen
122a1fc68f Import wiredtiger: f84cde5b5a24e543d0504e76b1cf3c0d777e6035 from branch mongodb-7.2
ref: de98396412..f84cde5b5a
for: 7.2.0-rc2

WT-11778 Restricting dirty eviction to sessions with snapshot isolation and of metadata pages
2023-11-15 02:04:06 +00:00
Luke Chen
7bf9b19da0 Import wiredtiger: de98396412fd5ce1084da888cb742a54e4dda9fe from branch mongodb-7.2
ref: a7926f926d..de98396412
for: 7.2.0-rc2

WT-11951 Fix prefetching integration with verify operation
2023-11-15 02:04:06 +00:00
Luke Chen
06ef441cc9 Import wiredtiger: a7926f926d88653c8e6698e87a56d6f8db7b52bb from branch mongodb-7.2
ref: d50915cc93..a7926f926d
for: 7.2.0-rc2

WT-9287 Add auto loading to GDB functions
2023-11-15 02:04:06 +00:00
Luke Chen
0852bf5837 Import wiredtiger: d50915cc93cd19d5f74fb92ad79403011c28debf from branch mongodb-7.2
ref: 4e00d59d01..d50915cc93
for: 7.2.0-rc2

WT-11793 Remove uses of WT_ internal macros in cpp suite: WT_BILLION,
2023-11-15 02:04:06 +00:00
Luke Chen
7830295d37 Import wiredtiger: 4e00d59d01598826f64478429e52bc24f2dbd68c from branch mongodb-7.2
ref: 8d844cb8d9..4e00d59d01
for: 7.2.0-rc2

WT-11955 Fix list formating bug in CONTRIBUTING.rst
2023-11-15 02:04:06 +00:00
Luke Chen
f11d8d3ffd Import wiredtiger: 8d844cb8d9572f3ea0bb9c69ddd9d5a1a7663cc0 from branch mongodb-7.2
ref: 578574b2c7..8d844cb8d9
for: 7.2.0-rc2

WT-11614 Parse the debug log into a set of corresponding functional model operations
2023-11-15 02:04:06 +00:00
Luke Chen
d86a8f3aed Import wiredtiger: 578574b2c7ac91bf859e30fd04c588e0cdf29523 from branch mongodb-7.2
ref: f9183b017d..578574b2c7
for: 7.2.0-rc2

WT-11217 Callback based session array traversal
2023-11-15 02:04:06 +00:00
Luke Chen
4f13c63a87 Import wiredtiger: f9183b017d6e455c6f97dcf7244b2ec0040dc1eb from branch mongodb-7.2
ref: a6340032e1..f9183b017d
for: 7.2.0-rc2

WT-9607 Fix timing of compact progress messages
2023-11-15 02:04:06 +00:00
Luke Chen
cf9545f43e Import wiredtiger: a6340032e1e1770fec1b493f0dd344458a28fee6 from branch mongodb-7.2
ref: 246e15a725..a6340032e1
for: 7.2.0-rc2

WT-11938 Allow Evergreen to apply options after ENABLE_TCMALLOC
2023-11-15 02:04:06 +00:00
Luke Chen
1e0bc6c19d Import wiredtiger: 246e15a72598acbcfd8775d46083205af543744f from branch mongodb-7.2
ref: 46e5e87098..246e15a725
for: 7.2.0-rc2

WT-11909 Add missing compile step for ex_extra_diagnostics
2023-11-15 02:04:06 +00:00
Kevin Cherkauer
e5ed10c76e SERVER-82736 Fix sbe::UnwindStage yield handling to not use freed memory 2023-11-14 21:09:00 +00:00
roganamy
9c6df663e5 SERVER-82954: Fix for BF-30717
(cherry picked from commit 557d12b8bd)
2023-11-14 18:15:13 +00:00
SimonEismann
79d63dc704 SERVER-82351 Revert "SERVER-80723: Clean up system_perf.yml" 2023-11-14 12:57:59 +00:00
Mickey. J Winters
0592edb56b SERVER-83150 make Document::shred() copy document metadata 2023-11-14 04:36:32 +00:00
Huayu Ouyang
3884d84f29 SERVER-79274 Fix race where FCV is uninitialized in between FCV checks
(cherry picked from commit a5da6271d5)
2023-11-14 03:30:12 +00:00
Erin Zhu
174ec4ffea SERVER-82782 Uses ISODate for "asOf" in $queryStats
(cherry picked from commit 6d70ea8342)
2023-11-13 23:45:53 +00:00
Dan Larkin-York
cf1865b616 SERVER-82090 Reduce scope of synchronization for archive-based reopening
(cherry picked from commit e98f26d0f9)
2023-11-13 23:03:19 +00:00
Uladzimir Makouski
b83466d202 Revert "SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary"
This reverts commit b8d09cc1fe.
2023-11-11 01:17:41 +00:00
egol
b8d09cc1fe SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary 2023-11-10 17:59:18 +00:00
Tommaso Tocci
215a1ef0d2 SERVER-83005 Reintroduce numInitialChunks parameter (IDL only) to maintain backward compatibility 2023-11-09 16:44:24 +00:00
Jordi Serra Torrens
c112a6acd1 SERVER-82361 Do not swallow StorageUnavailable if within a wuow
(cherry picked from commit 9a34542a8c)
2023-11-09 12:47:10 +00:00
Kruti Shah
0cfe182cb7 SERVER-82799 Increase reshardingCriticalSectionTimeoutMillis for resharding_update_tag_zones.js
(cherry picked from commit d6548865b5)
2023-11-08 18:16:47 +00:00
Mikhail Shchatko
c3f1e65a17 SERVER-82133 Copy required variants to etc/evergreen_nightly.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
7d9af0f285 SERVER-82133 Remove variants with "-wtdevelop" suffix from etc/evergreen_yml_components/variants/compile_static_analysis.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
c69d1393e4 SERVER-82133 Remove future git tag compile variant from etc/evergreen_yml_components/variants/compile_static_analysis.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
816b276820 SERVER-82133 Remove the FCV sys-perf variants from etc/system_perf.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
7d436a49a7 SERVER-82133 Remove all feature flags variants from etc/system_perf.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
c490817b9f SERVER-82133 Remove renew_ssl_cert from etc/system_perf.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
33735658d9 SERVER-82133 Change enterprise module branch name from "master" to "v7.2" in etc/system_perf.yml 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
84bba029b1 SERVER-82133 Update filename suffixes in buildscripts/generate_version_expansions.py from "latest" to "v7.2-latest" 2023-11-07 18:36:31 +00:00
Mikhail Shchatko
a3c3ecf14d SERVER-82133 Change references from "master" to "v7.2" in etc/evergreen_yml_components/definitions.yml 2023-11-07 18:36:31 +00:00
840 changed files with 21847 additions and 15981 deletions

View File

@ -1,6 +1,6 @@
# ![Logo](docs/leaf.svg) MongoDB README
Welcome to MongoDB!
Welcome to MongoDB 7.2!
## Components

File diff suppressed because it is too large Load Diff

View File

@ -73,6 +73,10 @@ def _load_expansions(expansions_file) -> dict:
return expansions
def _clean_key(key):
return key.replace("-", "_")
@click.command()
@click.argument("expansions_file", type=str)
@click.argument("defaults_file", type=str)
@ -87,7 +91,7 @@ def _main(expansions_file: str, defaults_file: str):
expansions[key] = value
for key, value in expansions.items():
print(f"{key}={quote(value)}; ", end="")
print(f"{_clean_key(key)}={quote(value)}; ", end="")
except Exception as ex: # pylint: disable=broad-except
_error(ex)

View File

@ -61,8 +61,8 @@ def generate_version_expansions():
raise ValueError("Unable to parse version from stdin and no version.json provided")
if version_parts[0]:
expansions["suffix"] = "latest"
expansions["src_suffix"] = "latest"
expansions["suffix"] = "v7.2-latest"
expansions["src_suffix"] = "v7.2-latest"
expansions["is_release"] = "false"
else:
expansions["suffix"] = version_line

View File

@ -601,15 +601,19 @@ class _ObjectBsonCppTypeBase(BsonCppTypeBase):
def gen_serializer_expression(self, indented_writer, expression, should_shapify=False):
# type: (writer.IndentedTextWriter, str, bool) -> str
method_name = writer.get_method_name(self._ast_type.serializer)
if self._ast_type.deserialize_with_tenant: # SerializationContext is tied to tenant deserialization
indented_writer.write_line(
common.template_args(
'const BSONObj localObject = ${expression}.${method_name}(getSerializationContext());',
expression=expression, method_name=method_name))
else:
indented_writer.write_line(
common.template_args('const BSONObj localObject = ${expression}.${method_name}();',
expression=expression, method_name=method_name))
function_arguments = []
# SerializationContext is tied to tenant deserialization
if self._ast_type.deserialize_with_tenant:
function_arguments.append('getSerializationContext()')
# Provide options if custom shapification required.
if should_shapify:
function_arguments.append('options')
indented_writer.write_line(
common.template_args(
'const BSONObj localObject = ${expression}.${method_name}(${function_arguments});',
expression=expression, method_name=method_name,
function_arguments=', '.join(function_arguments)))
return "localObject"

View File

@ -329,7 +329,7 @@ class _StructTypeInfo(StructTypeInfoBase):
# type: () -> MethodInfo
args = ['BSONObjBuilder* builder']
if self._struct.query_shape_component:
args.append("SerializationOptions options = {}")
args.append("const SerializationOptions& options = {}")
return MethodInfo(
common.title_case(self._struct.cpp_name), 'serialize', args, 'void', const=True)
@ -337,7 +337,7 @@ class _StructTypeInfo(StructTypeInfoBase):
# type: () -> MethodInfo
args = []
if self._struct.query_shape_component:
args.append("SerializationOptions options = {}")
args.append("const SerializationOptions& options = {}")
return MethodInfo(
common.title_case(self._struct.cpp_name), 'toBSON', args, 'BSONObj', const=True)

View File

@ -218,6 +218,92 @@ class TestGenerator(testcase.IDLTestcase):
""")
self.assertIn(expected, source)
def test_object_type_with_custom_serializer_and_query_shape_specification_custom(self) -> None:
"""Serialization with custom query_shape."""
_, source = self.assert_generate("""
types:
serialization_context:
bson_serialization_type: any
description: foo
cpp_type: foo
internal_only: true
object_type_with_custom_serializer:
bson_serialization_type: object
description: ObjWithCustomSerializer
cpp_type: ObjWithCustomSerializer
serializer: ObjWithCustomSerializer::toBSON
deserializer: ObjWithCustomSerializer::parse
structs:
QueryShapeSpec:
description: QueryShape
query_shape_component: true
fields:
internalObject:
type: object_type_with_custom_serializer
optional: false
description: internalObject
query_shape: custom
""")
expected = dedent("""
void QueryShapeSpec::serialize(BSONObjBuilder* builder, const SerializationOptions& options) const {
_hasMembers.required();
{
const BSONObj localObject = _internalObject.toBSON(options);
builder->append(kInternalObjectFieldName, localObject);
}
}""")
self.assertIn(expected, source)
def test_array_of_object_type_with_custom_serializer_and_query_shape_specification_custom(
self) -> None:
"""Serialization with custom query_shape used, array use case."""
_, source = self.assert_generate("""
types:
serialization_context:
bson_serialization_type: any
description: foo
cpp_type: foo
internal_only: true
object_type_with_custom_serializer:
bson_serialization_type: object
description: ObjWithCustomSerializer
cpp_type: ObjWithCustomSerializer
serializer: ObjWithCustomSerializer::toBSON
deserializer: ObjWithCustomSerializer::parse
structs:
QueryShapeSpec:
description: QueryShape
query_shape_component: true
fields:
internalObjectArray:
type: array<object_type_with_custom_serializer>
optional: false
description: internalObjectArray
query_shape: custom
""")
expected = dedent("""
void QueryShapeSpec::serialize(BSONObjBuilder* builder, const SerializationOptions& options) const {
_hasMembers.required();
{
BSONArrayBuilder arrayBuilder(builder->subarrayStart(kInternalObjectArrayFieldName));
for (const auto& item : _internalObjectArray) {
const BSONObj localObject = item.toBSON(options);
arrayBuilder.append(localObject);
}
}
}""")
self.assertIn(expected, source)
if __name__ == '__main__':

View File

@ -20,6 +20,7 @@ GENERIC_FCV = [
r'::kDowngradingFromLatestToLastLTS',
r'::kDowngradingFromLatestToLastContinuous',
r'\.isUpgradingOrDowngrading',
r'->isUpgradingOrDowngrading',
r'::kDowngradingFromLatestToLastContinuous',
r'::kUpgradingFromLastLTSToLastContinuous',
]

View File

@ -407,6 +407,10 @@ release_test_parser.add_argument("-e", "--edition", help="Server edition to run
release_test_parser.add_argument("-v", "--server-version", type=str,
help="Version of MongoDB to run tests for",
choices=["all"] + list(versions), default="all")
release_test_parser.add_argument(
"--evg-project", type=str, help=
"The evergreen project this is intended to run under (master only). Note that this interface is primarly for evergreen to set, and so the script will check if its is appropriate to run the tests.",
default="")
branch_test_parser = subparsers.add_parser("branch")
branch_test_parser.add_argument(
"-t", "--test", type=str, help=
@ -418,6 +422,19 @@ branch_test_parser.add_argument("-v", "--server-version", type=str,
help="Server version being tested", required=True)
args = parser.parse_args()
if args.command == "release":
evg_project = args.evg_project
if not evg_project:
logging.error(
"Missing '--evg-project' command line option. If trying to run this locally, you will need to set the environment so that --evg-project=mongodb-mongo-master."
)
sys.exit(1)
if re.fullmatch(r"mongodb-mongo-v\d\.\d", evg_project):
logging.info(
"Non-master evergreen project detected: '%s', skipping release package testing which is expected to only be run from master branches.",
evg_project)
sys.exit(0)
arch: str = args.arch
if arch == "auto":
arch = platform.machine()

View File

@ -60,6 +60,7 @@ selector:
- build/install/bin/abt_translation_bm*
# These benchmarks are being run as part of the benchmarks_streams.yml test suite.
- build/install/bin/streams_operator_dag_bm*
- build/install/bin/streams_window_operator_bm*
# These benchmarks are only run when modifying or upgrading the immutable library.
- build/install/bin/immutable_absl_comparison_bm*
- build/install/bin/immutable_std_comparison_bm*

View File

@ -7,7 +7,6 @@ selector:
# The trailing asterisk is for handling the .exe extension on Windows.
- build/**/system_resource_canary_bm*
- build/install/bin/streams_operator_dag_bm*
- build/install/bin/streams_window_operator_bm*
executor:
config: {}

View File

@ -15,8 +15,6 @@ selector:
- jstests/noPassthrough/libs/*.js
# Disable inmem_full as per SERVER-27014
- jstests/noPassthrough/inmem_full.js
# TODO SERVER-81313 re-enable this test
- jstests/noPassthrough/queryStats/query_stats_changeStreams.js
exclude_with_any_tags:
- cqf_experimental_incompatible
- cqf_incompatible

View File

@ -48,6 +48,7 @@ selector:
- jstests/core/**/plan_cache_shell_helpers.js
- jstests/core/**/plan_cache_stats_shard_and_host.js
- jstests/core/**/profile_query_hash.js
- jstests/core/query/plan_cache/match_or_duplicate_predicate_plan_cache.js
- jstests/core/sbe/from_plan_cache_flag.js
- jstests/core/sbe/plan_cache_sbe_with_or_queries.js
- jstests/core/sbe_plan_cache_autoparameterize_collscan.js

View File

@ -19,8 +19,6 @@ selector:
- jstests/noPassthrough/libs/*.js
# Disable inmem_full as per SERVER-27014
- jstests/noPassthrough/inmem_full.js
# TODO SERVER-81313 re-enable this test
- jstests/noPassthrough/queryStats/query_stats_changeStreams.js
exclude_with_any_tags:
# noPassthrough tests start their own mongod's.

View File

@ -8,6 +8,9 @@ selector:
roots:
- src/mongo/db/modules/*/jstests/search/*.js
- src/mongo/db/modules/*/jstests/mongot/*.js
exclude_files:
# Skip any tests that run with auth explicitly.
- src/mongo/db/modules/*/jstests/search/auth_list_search_indexes_agg.js
executor:
config:

View File

@ -8,6 +8,9 @@ selector:
roots:
- src/mongo/db/modules/*/jstests/search/*.js
- src/mongo/db/modules/*/jstests/mongot/*.js
exclude_files:
# Skip any tests that run with auth explicitly.
- src/mongo/db/modules/*/jstests/search/auth_list_search_indexes_agg.js
executor:
config:

View File

@ -105,6 +105,7 @@ DEFAULTS = {
"shuffle": None,
"stagger_jobs": None,
"majority_read_concern": "on",
"enable_enterprise_tests": None,
"shell_seed": None,
"storage_engine": "wiredTiger",
"storage_engine_cache_size_gb": None,
@ -637,7 +638,7 @@ USE_LEGACY_MULTIVERSION = True
# Expansions file location
# in CI, the expansions file is located in the ${workdir}, one dir up
# from src, the checkout directory
EXPANSIONS_FILE = "../expansions.yml" if 'CI' in os.environ else None
EXPANSIONS_FILE = "../expansions.yml" if 'CI' in os.environ else "expansions.yml"
# Symbolizer secrets
SYMBOLIZER_CLIENT_SECRET = None

View File

@ -321,6 +321,7 @@ be invoked as either:
_config.JOBS = config.pop("jobs")
_config.LINEAR_CHAIN = config.pop("linear_chain") == "on"
_config.MAJORITY_READ_CONCERN = config.pop("majority_read_concern") == "on"
_config.ENABLE_ENTERPRISE_TESTS = config.pop("enable_enterprise_tests")
_config.MIXED_BIN_VERSIONS = config.pop("mixed_bin_versions")
if _config.MIXED_BIN_VERSIONS is not None:
_config.MIXED_BIN_VERSIONS = _config.MIXED_BIN_VERSIONS.split("-")

View File

@ -101,8 +101,11 @@ def generate(expansions_file: str = "../expansions.yml",
# gather information from the current task being run
expansions = read_config_file(expansions_file)
distro = expansions.get(
"large_distro_name") if "large_distro_name" in expansions else expansions.get("distro_id")
distro = None
for distro_expansion in ["core_analyzer_distro_name", "large_distro_name", "distro_id"]:
if distro := expansions.get(distro_expansion, None):
break
assert distro is not None
current_task_name = expansions.get("task_name")
task_id = expansions.get("task_id")
execution = expansions.get("execution")

View File

@ -185,7 +185,8 @@ class TestRunner(Subcommand):
def generate_multiversion_exclude_tags(self):
"""Generate multiversion exclude tags file."""
generate_multiversion_exclude_tags.generate_exclude_yaml(
config.MULTIVERSION_BIN_VERSION, config.EXCLUDE_TAGS_FILE_PATH, self._resmoke_logger)
config.MULTIVERSION_BIN_VERSION, config.EXCLUDE_TAGS_FILE_PATH, config.EXPANSIONS_FILE,
self._resmoke_logger)
@staticmethod
def _find_suites_by_test(suites: List[Suite]):
@ -1106,6 +1107,11 @@ class RunPlugin(PluginInterface):
metavar="ON|OFF", help=("Enable or disable majority read concern support."
" Defaults to %(default)s."))
mongodb_server_options.add_argument(
"--enableEnterpriseTests", action="store", dest="enable_enterprise_tests", default="on",
choices=("on", "off"), metavar="ON|OFF",
help=("Enable or disable enterprise tests. Defaults to 'on'."))
mongodb_server_options.add_argument("--flowControl", action="store", dest="flow_control",
choices=("on", "off"), metavar="ON|OFF",
help=("Enable or disable flow control."))

View File

@ -5,6 +5,8 @@ import re
import tempfile
from collections import defaultdict
from subprocess import check_output
from typing import Optional
from github import GithubIntegration
import requests
@ -13,13 +15,35 @@ from buildscripts.resmokelib.config import MultiversionOptions
from buildscripts.resmokelib.core.programs import get_path_env_var
from buildscripts.resmokelib.utils import is_windows
from buildscripts.util.fileops import read_yaml_file
from buildscripts.util.read_config import read_config_file
BACKPORT_REQUIRED_TAG = "backport_required_multiversion"
# The directory in which BACKPORTS_REQUIRED_FILE resides.
ETC_DIR = "etc"
BACKPORTS_REQUIRED_FILE = "backports_required_for_multiversion_tests.yml"
BACKPORTS_REQUIRED_BASE_URL = "https://raw.githubusercontent.com/mongodb/mongo"
BACKPORTS_REQUIRED_BASE_URL = "https://raw.githubusercontent.com/10gen/mongo"
def get_installation_access_token(app_id: int, private_key: str,
installation_id: int) -> Optional[str]: # noqa: D406,D407,D413
"""
Obtain an installation access token using JWT.
Args:
- app_id: The application ID for GitHub App.
- private_key: The private key associated with the GitHub App.
- installation_id: The installation ID of the GitHub App for a particular account.
Returns:
- Optional[str]: The installation access token. Returns `None` if there's an error obtaining the token.
"""
integration = GithubIntegration(app_id, private_key)
auth = integration.get_access_token(installation_id)
if auth:
return auth.token
else:
raise Exception("Error obtaining installation token")
def get_backports_required_hash_for_shell_version(mongo_shell_path=None):
@ -51,10 +75,24 @@ def get_backports_required_hash_for_shell_version(mongo_shell_path=None):
f"Could not find a valid commit hash from the {mongo_shell_path} mongo binary.")
def get_old_yaml(commit_hash):
def get_old_yaml(commit_hash, expansions_file):
"""Download BACKPORTS_REQUIRED_FILE from the old commit and return the yaml."""
if not os.path.exists(expansions_file):
raise FileNotFoundError(f"The specified file does not exist: {expansions_file}")
expansions = read_config_file(expansions_file)
# Obtain installation access tokens using app credentials
access_token_10gen_mongo = get_installation_access_token(
expansions["app_id_10gen_mongo"], expansions["private_key_10gen_mongo"],
expansions["installation_id_10gen_mongo"])
response = requests.get(
f'{BACKPORTS_REQUIRED_BASE_URL}/{commit_hash}/{ETC_DIR}/{BACKPORTS_REQUIRED_FILE}')
f'{BACKPORTS_REQUIRED_BASE_URL}/{commit_hash}/{ETC_DIR}/{BACKPORTS_REQUIRED_FILE}',
headers={
'Authorization': f'token {access_token_10gen_mongo}',
})
# If the response was successful, no exception will be raised.
response.raise_for_status()
@ -68,7 +106,8 @@ def get_old_yaml(commit_hash):
return backports_required_old
def generate_exclude_yaml(old_bin_version: str, output: str, logger: logging.Logger) -> None:
def generate_exclude_yaml(old_bin_version: str, output: str, expansions_file: str,
logger: logging.Logger) -> None:
"""
Create a tag file associating multiversion tests to tags for exclusion.
@ -98,7 +137,7 @@ def generate_exclude_yaml(old_bin_version: str, output: str, logger: logging.Log
# Get the yaml contents from the old commit.
logger.info(f"Downloading file from commit hash of old branch {old_version_commit_hash}")
backports_required_old = get_old_yaml(old_version_commit_hash)
backports_required_old = get_old_yaml(old_version_commit_hash, expansions_file)
def diff(list1, list2):
return [elem for elem in (list1 or []) if elem not in (list2 or [])]

View File

@ -20,6 +20,8 @@ from buildscripts.resmokelib import utils
from buildscripts.resmokelib.utils import globstar
from buildscripts.resmokelib.utils import jscomment
ENTERPRISE_TEST_DIR = os.path.normpath("src/mongo/db/modules/enterprise/jstests")
########################
# Test file explorer #
########################
@ -272,6 +274,13 @@ class _TestList(object):
for path in paths.evaluated:
self._filtered.discard(path)
def filter_enterprise_tests(self):
"""Exclude tests that start with the enterprise module directory from the test list."""
self._filtered = {
test
for test in self._filtered if not os.path.normpath(test).startswith(ENTERPRISE_TEST_DIR)
}
def match_tag_expression(self, tag_expression, get_tags):
"""Filter the test list to only include tests that match the tag expression.
@ -511,6 +520,9 @@ class _Selector(object):
# 5. Apply the include files last with force=True to take precedence over the tags.
if self._tests_are_files and selector_config.include_files:
test_list.include_files(selector_config.include_files)
# 6: Apply the enterprise tests filter
if self.get_enterprise_tests_status() == "off":
test_list.filter_enterprise_tests()
return self.sort_tests(*test_list.get_tests())
@ -526,6 +538,11 @@ class _Selector(object):
"""Retrieve the tags associated with the give test file."""
return []
@staticmethod
def get_enterprise_tests_status() -> str:
"""Get the status of enterprise tests from the configuration."""
return config.ENABLE_ENTERPRISE_TESTS
class _JSTestSelectorConfig(_SelectorConfig):
"""_SelectorConfig subclass for JavaScript tests."""

View File

@ -367,6 +367,7 @@ class ShardedClusterFixture(interface.Fixture, interface._DockerComposeInterface
del mongod_options["shardsvr"]
mongod_options["configsvr"] = ""
replset_config_options["configsvr"] = True
mongod_options["set_parameters"]["featureFlagTransitionToCatalogShard"] = "true"
mongod_options["storageEngine"] = "wiredTiger"
configsvr_options = self.configsvr_options.copy()
@ -415,6 +416,8 @@ class ShardedClusterFixture(interface.Fixture, interface._DockerComposeInterface
"""Return options that may be passed to a mongos."""
mongos_options = self.mongos_options.copy()
mongos_options["configdb"] = self.configsvr.get_internal_connection_string()
if self.config_shard is not None:
mongos_options["set_parameters"]["featureFlagTransitionToCatalogShard"] = "true"
mongos_options["set_parameters"] = mongos_options.get("set_parameters",
self.fixturelib.make_historic(
{})).copy()

View File

@ -67,10 +67,20 @@ def main():
try:
run_command(" ".join(docker_cmd))
except subprocess.CalledProcessError as e:
# Handle the specific error case for "No new changes..." between two repos
if "No new changes to import for resolved ref" not in str(e.stderr):
raise
except subprocess.CalledProcessError as err:
error_message = str(err.stderr)
acceptable_error_messages = [
# Indicates the two repositories are identical
"No new changes to import for resolved ref",
# Indicates differences exist but no changes affect the destination, for example: exclusion rules
"Iterative workflow produced no changes in the destination for resolved ref",
]
if any(acceptable_message in error_message
for acceptable_message in acceptable_error_messages):
return
raise
if __name__ == "__main__":

View File

@ -10,6 +10,7 @@ from buildscripts.resmokelib.run import generate_multiversion_exclude_tags as un
from buildscripts.util.fileops import read_yaml_file
EXCLUDE_TAGS_FILE = "multiversion_exclude_tags.yml"
EXPANSIONS_FILE = "expansions.yml"
class TestGenerateExcludeYaml(unittest.TestCase):
@ -39,6 +40,7 @@ class TestGenerateExcludeYaml(unittest.TestCase):
output = os.path.join(self._tmpdir.name, EXCLUDE_TAGS_FILE)
under_test.generate_exclude_yaml(old_bin_version=old_bin_version, output=output,
expansions_file=EXPANSIONS_FILE,
logger=MagicMock())
mock_read_yaml.assert_called_once()

View File

@ -66,6 +66,9 @@ COMMON_PUBLIC_PATTERN = r"""
"""
"""Common Public pattern format."""
COMMON_10GENREPO_COMMIT_QUEUE_PATTERN = r' ^\'(?P<repo>10gen/mongo)\'\s.*commit\squeue\smerge.*SERVER-[0-9]+'
"""Common commit queue format."""
COMMON_LINT_PATTERN = r"(?P<lint>Fix\slint)"
"""Common Lint pattern format."""
@ -120,6 +123,12 @@ def old_patch_description(pattern: str) -> str:
# NOTE: re.VERBOSE is for visibility / debugging. As such significant white space must be
# escaped (e.g ' ' to \s).
VALID_PATTERNS = [
re.compile(
new_patch_description(COMMON_10GENREPO_COMMIT_QUEUE_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE),
re.compile(
old_patch_description(COMMON_10GENREPO_COMMIT_QUEUE_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE),
re.compile(
new_patch_description(COMMON_PUBLIC_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE,

View File

@ -1,28 +0,0 @@
# This configuration is for migrating code from one Git repository to another using Copybara.
# It selectively copies content, excluding specific paths and preserving authorship.
sourceUrl = "git@github.com:10gen/mongo.git"
destinationUrl = "git@github.com:10gen/mongo-copybara.git"
core.workflow(
name = "default",
origin = git.origin(
url = sourceUrl,
ref = "master",
# VersionSelector
),
destination = git.destination(
url = destinationUrl,
fetch = "master",
push = "master",
),
# Change path to the folder you want to publish publicly
origin_files = glob(["**"], exclude=["src/mongo/db/modules/**"]),
authoring = authoring.pass_thru("MongoDB <mongodb@mongodb.com>"),
mode = "ITERATIVE",
# Change the path here to the folder you want to publish publicly
# transformations = [
# core.move("path/to/folder/you/want/exported", ""),
# ],
)

View File

@ -392,7 +392,7 @@ last-continuous:
- test_file: jstests/sharding/query/sharded_lookup_execution.js
ticket: SERVER-77427
- test_file: jstests/sharding/multi_collection_transaction_placement_conflict_workaround.js
ticket: SERVER-77506
ticket: SERVER-84723
- test_file: jstests/sharding/fsync_lock_unlock.js
ticket: SERVER-73685
- test_file: jstests/sharding/fsync_lock_ddl_lock.js
@ -495,6 +495,64 @@ last-continuous:
ticket: SERVER-81985
- test_file: jstests/core/timeseries/timeseries_collection_uuid.js
ticket: SERVER-81379
- test_file: src/mongo/db/modules/enterprise/jstests/fle2/basic_update.js
ticket: SERVER-82984
- test_file: src/mongo/db/modules/enterprise/jstests/fle2/basic_replace.js
ticket: SERVER-82984
- test_file: jstests/core/timeseries/timeseries_project_pushdown.js
ticket: SERVER-82447
- test_file: jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js
ticket: SERVER-79848
- test_file: jstests/core/find_with_resume_after_param.js
ticket: SERVER-79848
- test_file: jstests/core/timeseries/timeseries_resume_after.js
ticket: SERVER-79848
- test_file: src/mongo/db/modules/enterprise/jstests/external_auth_oidc/oidc_internal_authz.js
ticket: SERVER-78066
- test_file: src/mongo/db/modules/enterprise/jstests/external_auth_oidc/oidc_omit_client_id.js
ticket: SERVER-78066
- test_file: jstests/core/query/explode_for_sort_plan_cache.js
ticket: SERVER-83777
- test_file: jstests/core/txns/out_not_blocked_by_txn.js
ticket: SERVER-72703
- test_file: jstests/core/command_let_variables.js
ticket: SERVER-83685
- test_file: jstests/core/index/index_filter_commands_invalidate_plan_cache_entries.js
ticket: SERVER-83685
- test_file: jstests/core/index/wildcard/wildcard_index_cached_plans.js
ticket: SERVER-83685
- test_file: jstests/core/query/expr/expr_index_use.js
ticket: SERVER-83685
- test_file: jstests/core/query/plan_cache/plan_cache_list_plans.js
ticket: SERVER-83685
- test_file: jstests/core/query/plan_cache/plan_cache_list_shapes.js
ticket: SERVER-83685
- test_file: jstests/core/query/plan_cache/plan_cache_stats_shard_and_host.js
ticket: SERVER-83685
- test_file: jstests/core/query/plan_cache/plan_cache_shell_helpers.js
ticket: SERVER-83685
- test_file: jstests/core/views/views_aggregation.js
ticket: SERVER-83685
- test_file: jstests/noPassthroughWithMongod/lookup_with_limit.js
ticket: SERVER-83685
- test_file: jstests/sharding/move_primary_basic.js
ticket: SERVER-82353
- test_file: jstests/sharding/store_historical_placement_data.js
ticket: SERVER-82353
- test_file: jstests/noPassthrough/disallow_new_transactions_at_shutdown_on_mongos.js
ticket: SERVER-77667
- test_file: jstests/core/notablescan.js
ticket: SERVER-83119
- test_file: jstests/sharding/clustered_coll_scan.js
ticket: SERVER-83119
- test_file: jstests/sharding/eof_plan.js
ticket: SERVER-83119
- test_file: jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_cluster_config_shard.js
ticket: SERVER-84548
- test_file: src/mongo/db/modules/enterprise/jstests/hot_backups/multiVersion/sharded_last_cont_pit_backup_restore_simple_config_shard.js
ticket: SERVER-84548
- test_file: src/mongo/db/modules/enterprise/jstests/hot_backups/multiVersion/sharded_last_cont_backup_restore_simple_config_shard.js
ticket: SERVER-84548
suites: null
last-lts:
all:
@ -943,7 +1001,7 @@ last-lts:
- test_file: jstests/sharding/query/sharded_lookup_execution.js
ticket: SERVER-77427
- test_file: jstests/sharding/multi_collection_transaction_placement_conflict_workaround.js
ticket: SERVER-77506
ticket: SERVER-84723
- test_file: jstests/sharding/fsync_lock_unlock.js
ticket: SERVER-73685
- test_file: jstests/sharding/fsync_lock_ddl_lock.js
@ -1052,4 +1110,40 @@ last-lts:
ticket: SERVER-81985
- test_file: jstests/core/timeseries/timeseries_collection_uuid.js
ticket: SERVER-81379
- test_file: src/mongo/db/modules/enterprise/jstests/fle2/basic_update.js
ticket: SERVER-82984
- test_file: src/mongo/db/modules/enterprise/jstests/fle2/basic_replace.js
ticket: SERVER-82984
- test_file: jstests/core/timeseries/timeseries_project_pushdown.js
ticket: SERVER-82447
- test_file: jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js
ticket: SERVER-79848
- test_file: jstests/core/find_with_resume_after_param.js
ticket: SERVER-79848
- test_file: jstests/core/timeseries/timeseries_resume_after.js
ticket: SERVER-79848
- test_file: jstests/core/query/explode_for_sort_plan_cache.js
ticket: SERVER-83777
- test_file: jstests/core/txns/out_not_blocked_by_txn.js
ticket: SERVER-72703
- test_file: jstests/sharding/move_primary_basic.js
ticket: SERVER-82353
- test_file: jstests/sharding/store_historical_placement_data.js
ticket: SERVER-82353
- test_file: jstests/core/timeseries/timeseries_bucket_level_filter.js
ticket: SERVER-84130
- test_file: jstests/noPassthrough/disallow_new_transactions_at_shutdown_on_mongos.js
ticket: SERVER-77667
- test_file: jstests/core/notablescan.js
ticket: SERVER-83119
- test_file: jstests/sharding/clustered_coll_scan.js
ticket: SERVER-83119
- test_file: jstests/sharding/eof_plan.js
ticket: SERVER-83119
- test_file: jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_cluster_config_shard.js
ticket: SERVER-84548
- test_file: src/mongo/db/modules/enterprise/jstests/hot_backups/multiVersion/sharded_last_cont_pit_backup_restore_simple_config_shard.js
ticket: SERVER-84548
- test_file: src/mongo/db/modules/enterprise/jstests/hot_backups/multiVersion/sharded_last_cont_backup_restore_simple_config_shard.js
ticket: SERVER-84548
suites: null

View File

@ -53,13 +53,15 @@
# - func: "set up venv"
include:
- filename: etc/evergreen_yml_components/configuration.yml
- filename: etc/evergreen_yml_components/definitions.yml
- filename: etc/evergreen_yml_components/variants/task_generation.yml
- filename: etc/evergreen_yml_components/variants/sanitizer.yml
- filename: etc/evergreen_yml_components/variants/in_memory.yml
- filename: etc/evergreen_yml_components/variants/ninja.yml
- filename: etc/evergreen_yml_components/variants/compile_static_analysis.yml
- filename: etc/evergreen_yml_components/variants/config_shard.yml
# TODO: (SERVER-86211) Re-enable config shard evergreen variant.
# - filename: etc/evergreen_yml_components/variants/config_shard.yml
- filename: etc/evergreen_yml_components/perf_tasks.yml
variables:
@ -78,15 +80,15 @@ variables:
- name: generate_buildid_to_debug_symbols_mapping
variant: linux-x86-dynamic-compile
- &linux_x86_compile_variant_dependency
- &amazon2_x86_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &linux_x86_compile_variant_name linux-x86-compile #static compile
variant: &amazon2_x86_compile_variant_name amazon2-x86-compile #static compile
- name: version_gen
variant: generate-tasks-for-version
omit_generated_tasks: true
- name: generate_buildid_to_debug_symbols_mapping
variant: linux-x86-compile
variant: amazon2-x86-compile
- &amazon_linux2_arm64_dynamic_compile_variant_dependency
depends_on:
@ -152,15 +154,16 @@ variables:
multiversion_edition: enterprise
repo_edition: enterprise
large_distro_name: rhel80-medium
core_analyzer_distro_name: rhel80-large
num_scons_link_jobs_available: 0.99
compile_variant: *linux_x86_dynamic_compile_variant_name
- &linux_x86_expansions
- &amazon2_x86_expansions
multiversion_platform: amazon2
multiversion_edition: enterprise
repo_edition: enterprise
num_scons_link_jobs_available: 0.99
compile_variant: *linux_x86_compile_variant_name
compile_variant: *amazon2_x86_compile_variant_name
- &linux_arm64_generic_expansions
multiversion_platform: amazon2
@ -399,14 +402,14 @@ buildvariants:
###########################################
# Linux buildvariants #
###########################################
- <<: *linux_x86_compile_variant_dependency
- <<: *amazon2_x86_compile_variant_dependency
name: perf-standalone-classic-query-engine.intel.aws.2023-09
display_name: PERF Standalone (Classic Query Engine) Intel AWS 2023-09
# cron: &cron_query_perf_schedule "0 0 * * 4" # 00:00 on Thursday
activate: false
modules: *perf_modules
expansions:
<<: *linux_x86_expansions
<<: *amazon2_x86_expansions
idle_timeout_factor: 1.5
exec_timeout_factor: 1.5
mongodb_setup_release: 2022-11
@ -418,7 +421,7 @@ buildvariants:
project_dir: *perf_project_dir
authentication: enabled
storageEngine: wiredTiger
compile_variant: *linux_x86_compile_variant_name
compile_variant: *amazon2_x86_compile_variant_name
run_on:
- amazon2
tasks: &classic_engine_tasks
@ -456,6 +459,7 @@ buildvariants:
target_resmoke_time: 15
max_sub_suites: 5
large_distro_name: rhel80-medium
core_analyzer_distro_name: rhel80-large
compile_variant: *linux_x86_dynamic_debug_compile_variant_name
tasks:
- name: .aggregation !.encrypt !.feature_flag_guarded
@ -1385,7 +1389,6 @@ buildvariants:
max_sub_suites: 5
test_flags: >-
--mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
--excludeWithAnyTags=requires_sbe
large_distro_name: rhel80-medium
depends_on:
- name: archive_dist_test_debug
@ -1402,9 +1405,8 @@ buildvariants:
- name: .causally_consistent !.sharding
- name: .change_stream_fuzzer
- name: .change_streams
# TODO(SERVER-79848): Remove !.sharded
- name: .concurrency !.large !.ubsan !.no_txns !.compute_mode !.sharded
- name: .concurrency .large !.ubsan !.no_txns !.compute_mode !.sharded
- name: .concurrency !.large !.ubsan !.no_txns !.compute_mode
- name: .concurrency .large !.ubsan !.no_txns !.compute_mode
distros:
- rhel80-medium
- name: .encrypt
@ -2075,7 +2077,7 @@ buildvariants:
<<: *aubsan-lite-required-expansions
test_flags: >-
--mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
--excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits,requires_sbe
--excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
tasks:
- name: .aggregation !.sbe_only
- name: .auth
@ -2084,8 +2086,7 @@ buildvariants:
- name: .change_streams
# - name: disk_wiredtiger
- name: .misc_js
# TODO(SERVER-79848): Remove !.sharded
- name: .concurrency !.ubsan !.no_txns !.kill_terminate !.compute_mode !.sharded
- name: .concurrency !.ubsan !.no_txns !.kill_terminate !.compute_mode
- name: .encrypt
- name: external_auth
- name: external_auth_aws
@ -2104,8 +2105,7 @@ buildvariants:
- name: replica_sets_large_txns_format_jscore_passthrough
- name: .replica_sets !.multi_oplog
- name: .replica_sets .encrypt
# TODO(SERVER-79848): Re-enable resharding_fuzzer
# - name: .resharding_fuzzer
- name: .resharding_fuzzer
- name: .retry
- name: .rollbackfuzzer
- name: .read_only
@ -2249,6 +2249,7 @@ buildvariants:
scons_cache_scope: shared
separate_debug: off
large_distro_name: rhel80-medium
core_analyzer_distro_name: rhel80-large
multiversion_platform: rhel80
multiversion_edition: enterprise
test_flags: >-
@ -2961,7 +2962,7 @@ buildvariants:
max_sub_suites: 3
test_flags: >-
--mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
--excludeWithAnyTags=resource_intensive,requires_sbe
--excludeWithAnyTags=resource_intensive
- <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-template
name: enterprise-rhel-80-64-bit-dynamic-classic-engine-all-feature-flags-required-query-patch-only
@ -2976,7 +2977,7 @@ buildvariants:
test_flags: >-
--mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
--runAllFeatureFlagTests
--excludeWithAnyTags=resource_intensive,requires_sbe
--excludeWithAnyTags=resource_intensive,featureFlagSbeFull
tasks:
- name: analyze_shard_key_jscore_passthrough_gen
- name: query_golden_classic
@ -3000,9 +3001,8 @@ buildvariants:
- name: change_streams_multitenant_sharded_collections_passthrough
- name: .misc_js
- name: .clustered_collections
# TODO(SERVER-79848): Remove !.sharded
- name: .concurrency !.large !.ubsan !.no_txns !.sharded
- name: .concurrency .large !.ubsan !.no_txns !.sharded
- name: .concurrency !.large !.ubsan !.no_txns
- name: .concurrency .large !.ubsan !.no_txns
distros:
- rhel80-medium
- name: .config_fuzzer !.large

View File

@ -1,25 +1,572 @@
# Similar to etc/evergreen.yml, but for release builds.
include:
- filename: etc/evergreen_yml_components/configuration.yml
- filename: etc/evergreen_yml_components/definitions.yml
- filename: etc/evergreen_yml_components/variants/task_generation.yml
- filename: etc/evergreen_yml_components/variants/atlas.yml
- filename: etc/evergreen_yml_components/variants/misc_release.yml
### Comment out when using this file for a Rapid release branch. ###
- filename: etc/evergreen_yml_components/variants/ibm.yml
# - filename: etc/evergreen_yml_components/variants/ibm.yml
### Uncomment when using this file for a LTS release branch. ###
# - filename: etc/evergreen_yml_components/variants/in_memory.yml
### Uncomment when using this file for a LTS or Rapid release branch. ###
# - filename: etc/evergreen_yml_components/variants/sanitizer.yml
- filename: etc/evergreen_yml_components/variants/sanitizer.yml
### Uncomment when using this file for a LTS or Rapid release branch. ###
# - filename: etc/evergreen_yml_components/variants/ninja.yml
- filename: etc/evergreen_yml_components/variants/ninja.yml
### Uncomment when using this file for a LTS or Rapid release branch. ###
# - filename: etc/evergreen_yml_components/variants/classic_engine.yml
- filename: etc/evergreen_yml_components/variants/classic_engine.yml
### Uncomment when using this file for a LTS or Rapid release branch. ###
# TODO: (SERVER-86211) Re-enable config shard evergreen variant.
# - filename: etc/evergreen_yml_components/variants/config_shard.yml
- filename: etc/evergreen_yml_components/variants/compile_static_analysis.yml
parameters:
- key: evergreen_config_file_path
value: "etc/evergreen_nightly.yml"
description: "path to this file"
variables:
- &linux_x86_dynamic_debug_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &linux_x86_dynamic_debug_compile_variant_name linux-x86-dynamic-debug-compile-required
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
- name: generate_buildid_to_debug_symbols_mapping
variant: linux-x86-dynamic-debug-compile-required
- &windows_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &windows_compile_variant_name windows-compile-required
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
- name: generate_buildid_to_debug_symbols_mapping
variant: windows-compile-required
- &amazon_linux2_arm64_dynamic_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &amazon_linux2_arm64_dynamic_compile_variant_name amazon-linux2-arm64-dynamic-compile
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
- name: generate_buildid_to_debug_symbols_mapping
variant: amazon-linux2-arm64-dynamic-compile
# Common compile variant dependency specifications.
# THIS WAS COPIED TO config_shard.yml - ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THAT FILE.
- &linux_x86_dynamic_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &linux_x86_dynamic_compile_variant_name linux-x86-dynamic-compile
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
- name: generate_buildid_to_debug_symbols_mapping
variant: linux-x86-dynamic-compile
# THIS WAS COPIED TO config_shard.yml - ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THAT FILE.
- &linux_x86_generic_expansions
multiversion_platform: rhel80
multiversion_edition: enterprise
repo_edition: enterprise
large_distro_name: rhel80-medium
num_scons_link_jobs_available: 0.99
compile_variant: *linux_x86_dynamic_compile_variant_name
- &linux_debug_aubsan_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &linux_debug_aubsan_compile_variant_name linux-debug-aubsan-compile-required
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
- name: generate_buildid_to_debug_symbols_mapping
variant: linux-debug-aubsan-compile-required
# If you add anything to san_options, make sure the appropriate changes are
# also made to SConstruct.
# and also to the san_options in compile_static_analysis.yml and sanitizer.yml
- aubsan_options: &aubsan_options
>-
UBSAN_OPTIONS="print_stacktrace=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
LSAN_OPTIONS="suppressions=etc/lsan.suppressions:report_objects=1"
ASAN_OPTIONS="detect_leaks=1:check_initialization_order=true:strict_init_order=true:abort_on_error=1:disable_coredump=0:handle_abort=1:strict_string_checks=true:detect_invalid_pointer_pairs=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
- &linux_arm64_generic_expansions
multiversion_platform: amazon2
multiversion_edition: enterprise
multiversion_architecture: aarch64
packager_arch: aarch64
packager_distro: amazon2
repo_edition: enterprise
large_distro_name: amazon2-arm64-large
num_scons_link_jobs_available: 0.99
compile_variant: *amazon_linux2_arm64_dynamic_compile_variant_name
- &enterprise-amazon-linux2-arm64-all-feature-flags-template
<<: *amazon_linux2_arm64_dynamic_compile_variant_dependency
name: &enterprise-amazon-linux2-arm64-all-feature-flags enterprise-amazon-linux2-arm64-all-feature-flags
display_name: "! Amazon Linux 2 arm64 (all feature flags)"
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
modules:
- enterprise
run_on:
- amazon2-arm64-small
stepback: true
expansions: &enterprise-amazon-linux2-arm64-all-feature-flags-expansions
<<: *linux_arm64_generic_expansions
scons_cache_scope: shared
scons_cache_mode: all
has_packages: false
jstestfuzz_num_generated_files: 40
jstestfuzz_concurrent_num_files: 10
target_resmoke_time: 10
max_sub_suites: 5
idle_timeout_factor: 1.5
exec_timeout_factor: 1.5
test_flags: >-
--runAllFeatureFlagTests
--excludeWithAnyTags=incompatible_with_amazon_linux,requires_external_data_source
tasks:
- name: analyze_shard_key_jscore_passthrough_gen
- name: query_golden_classic
- name: lint_fuzzer_sanity_patch
- name: test_api_version_compatibility
- name: check_feature_flag_tags
- name: check_for_todos
- name: .aggfuzzer !.cqf_only
- name: .aggregation
- name: aggregation_repeat_queries
- name: audit
- name: .auth
- name: buildscripts_test
- name: .bulk_write
- name: resmoke_end2end_tests
- name: unittest_shell_hang_analyzer_gen
- name: .causally_consistent !.sharding
- name: .change_streams
- name: .change_stream_fuzzer
# TODO SERVER-57866: Remove the explicit mentions of change stream multitenant suites.
- name: change_streams_multitenant_passthrough
- name: change_streams_multitenant_sharded_collections_passthrough
- name: .cqf
- name: .misc_js
- name: .clustered_collections
- name: .concurrency !.large !.ubsan !.no_txns
- name: .concurrency .large !.ubsan !.no_txns
- name: .config_fuzzer !.large
- name: .config_fuzzer .large
distros:
- amazon2-arm64-large
- name: .config_fuzzer_stress
distros:
- amazon2-arm64-large
- name: disk_wiredtiger
- name: .encrypt
- name: feature_flag_multiversion_gen
- name: idl_tests
- name: initial_sync_fuzzer_gen
- name: .jscore .common
- name: jsCore_column_store_indexes
- name: jsCore_min_batch_repeat_queries_ese_gsm
- name: jsCore_txns_large_txns_format
- name: jsCore_wildcard_indexes
- name: json_schema
- name: .jstestfuzz !.flow_control # Flow control jstestfuzz take longer.
- name: libunwind_tests
- name: .multiversion_sanity_check
- name: .multi_shard
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
- name: multiversion_gen
- name: powercycle_smoke
- name: .query_fuzzer !.cqf_only
- name: .random_multiversion_ds
- name: .read_write_concern .large
- name: .read_write_concern !.large
- name: .replica_sets !.encrypt !.auth
- name: replica_sets_api_version_jscore_passthrough_gen
- name: replica_sets_reconfig_jscore_passthrough_gen
- name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
- name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
- name: change_streams_pre_images_replica_sets_stepdown_primary_jscore_passthrough_gen
- name: change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough_gen
- name: change_streams_change_collection_replica_sets_stepdown_primary_jscore_passthrough_gen
- name: change_streams_change_collection_replica_sets_kill_secondary_jscore_passthrough_gen
- name: retryable_writes_jscore_passthrough_gen
- name: retryable_writes_jscore_stepdown_passthrough_gen
- name: .read_only
- name: .rollbackfuzzer
- name: sasl
- name: search
- name: search_auth
- name: search_pinned_connections_auth
- name: search_ssl
- name: secondary_reads_passthrough_gen
- name: .serverless
distros:
- amazon2-arm64-large
- name: session_jscore_passthrough
- name: .shard_split
- name: .sharding .jscore !.wo_snapshot !.multi_stmt
- name: sharding_api_version_jscore_passthrough_gen
- name: sharding_api_strict_passthrough_gen
- name: .sharding .txns
- name: .sharding .common
- name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
- name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
- name: sharded_multi_stmt_txn_jscore_passthrough
- name: streams
- name: streams_auth
- name: .updatefuzzer
- name: vector_search
- name: vector_search_auth
- name: vector_search_ssl
- name: query_stats_passthrough
- name: query_stats_passthrough_writeonly
- name: query_stats_mongos_passthrough
buildvariants:
- &linux-64-debug-required-template
<<: *linux_x86_dynamic_debug_compile_variant_dependency
name: &linux-64-debug-required linux-64-debug-required
display_name: "! Linux x86 Shared Library DEBUG"
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
run_on:
- rhel80-medium
expansions:
resmoke_jobs_factor: 0.5 # Avoid starting too many mongod's
test_flags: --excludeWithAnyTags=requires_http_client
target_resmoke_time: 15
max_sub_suites: 5
large_distro_name: rhel80-medium
compile_variant: *linux_x86_dynamic_debug_compile_variant_name
tasks:
- name: .aggregation !.encrypt !.feature_flag_guarded
- name: .auth !.audit !.multiversion
- name: sharding_auth_gen
- name: .causally_consistent !.wo_snapshot
- name: .change_streams
- name: .clustered_collections
- name: .misc_js
- name: disk_wiredtiger
- name: .jscore .common
- name: jsCore_txns_large_txns_format
- name: json_schema
- name: query_golden_classic
- name: libunwind_tests
- name: .multi_shard
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
- name: .ocsp
- name: .read_write_concern
- name: .replica_sets !.encrypt !.fcbis
- name: replica_sets_reconfig_jscore_passthrough_gen
- name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
- name: replica_sets_max_mirroring_large_txns_format_gen
- name: .retry
- name: .read_only
- name: session_jscore_passthrough
- name: sharded_multi_stmt_txn_jscore_passthrough
- name: .sharding .jscore !.wo_snapshot
- name: sharding_gen
- name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
- &enterprise-windows-template
<<: *windows_compile_variant_dependency
name: &enterprise-windows-required enterprise-windows-required
display_name: "! Enterprise Windows"
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
modules:
- enterprise
run_on:
- windows-vsCurrent-small
expansions: &windows_required_expansions
compile_variant: *windows_compile_variant_name
burn_in_tests_build_variant: enterprise-windows-required
exe: ".exe"
content_type: application/zip
python: '/cygdrive/c/python/python39/python.exe'
ext: zip
multiversion_platform: windows
multiversion_edition: enterprise
jstestfuzz_num_generated_files: 35
target_resmoke_time: 20
max_sub_suites: 5
large_distro_name: windows-vsCurrent-large
push_path: windows
push_bucket: downloads.10gen.com
push_name: windows
push_arch: x86_64-enterprise
test_flags: &windows_common_test_excludes --excludeWithAnyTags=incompatible_with_windows_tls
external_auth_jobs_max: 1
tasks:
- name: audit
- name: auth_audit_gen
- name: causally_consistent_jscore_txns_passthrough
distros:
- windows-vsCurrent-large
- name: .encrypt !.aggregation !.replica_sets !.sharding !.jscore
- name: external_auth
- name: external_auth_aws
- name: external_auth_windows
distros:
- windows-2016-dc
- name: .jscore .common !.sharding
- name: jsCore_auth
- name: jsCore_ese
- name: jsCore_txns_large_txns_format
- name: .jstestfuzz .common
- name: noPassthrough_gen
- name: noPassthroughWithMongod_gen
- name: .replica_sets .common
- name: .replica_sets .multi_oplog !.gcm
- name: sasl
- name: .sharding .txns
- name: sharding_auth_audit_gen
- name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gen
- name: run-all-affected-jstests
display_name: "! Run All Affected JStests"
patch_only: true
run_on:
- rhel80-medium
expansions:
large_distro_name: rhel80-large
burn_in_tag_include_all_required_and_suggested: true
burn_in_tag_exclude_build_variants: >-
macos-debug-suggested
burn_in_tag_include_build_variants:
burn_in_tag_compile_task_dependency: archive_dist_test_debug
compile_variant: *amazon_linux2_arm64_dynamic_compile_variant_name
depends_on:
- name: archive_dist_test_debug
variant: *amazon_linux2_arm64_dynamic_compile_variant_name
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
- name: version_burn_in_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
tasks:
- name: burn_in_tags_gen
- &enterprise-rhel-80-64-bit-dynamic-template
<<: *linux_x86_dynamic_compile_variant_dependency
name: &enterprise-rhel-80-64-bit-dynamic enterprise-rhel-80-64-bit-dynamic
display_name: "! Shared Library Enterprise RHEL 8.0"
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
modules:
- enterprise
run_on:
- rhel80-small
# THIS WAS COPIED TO config_shard.yml - ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THAT FILE.
expansions: &enterprise-rhel-80-64-bit-dynamic-expansions
<<: *linux_x86_generic_expansions
scons_cache_scope: shared
scons_cache_mode: all
has_packages: false
jstestfuzz_num_generated_files: 40
jstestfuzz_concurrent_num_files: 10
target_resmoke_time: 10
max_sub_suites: 5
idle_timeout_factor: 1.5
exec_timeout_factor: 1.5
large_distro_name: rhel80-medium
depends_on:
- name: archive_dist_test_debug
variant: *linux_x86_dynamic_compile_variant_name
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
tasks:
- name: .aggfuzzer !.feature_flag_guarded
- name: .aggregation !.feature_flag_guarded
- name: aggregation_repeat_queries
- name: analyze_shard_key_jscore_passthrough_gen
- name: audit
- name: .auth
- name: unittest_shell_hang_analyzer_gen
- name: .causally_consistent !.sharding
- name: .change_streams
- name: .change_stream_fuzzer
- name: .misc_js
- name: .concurrency !.large !.ubsan !.no_txns
- name: .concurrency .large !.ubsan !.no_txns
distros:
- rhel80-medium
- name: .config_fuzzer !.large
- name: .config_fuzzer .large
distros:
- rhel80-medium
- name: disk_wiredtiger
- name: .encrypt
- name: idl_tests
- name: initial_sync_fuzzer_gen
- name: fcv_upgrade_downgrade_replica_sets_jscore_passthrough_gen
- name: fcv_upgrade_downgrade_sharding_jscore_passthrough_gen
- name: fcv_upgrade_downgrade_sharded_collections_jscore_passthrough_gen
- name: jsCore
distros:
- rhel80-xlarge
- name: .jscore .common !jsCore
- name: jsCore_min_batch_repeat_queries_ese_gsm
- name: jsCore_txns_large_txns_format
- name: json_schema
- name: .jstestfuzz !.flow_control # Flow control jstestfuzz take longer.
- name: libunwind_tests
- name: .multi_shard
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
- name: multiversion_gen
- name: .query_fuzzer !.feature_flag_guarded
- name: .random_multiversion_ds
- name: .read_write_concern .large
distros:
- rhel80-medium
- name: .read_write_concern !.large
- name: .replica_sets !.encrypt !.auth
distros:
- rhel80-xlarge
- name: replica_sets_api_version_jscore_passthrough_gen
- name: replica_sets_reconfig_jscore_passthrough_gen
- name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
distros:
- rhel80-xlarge
- name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
distros:
- rhel80-xlarge
- name: change_streams_pre_images_replica_sets_stepdown_primary_jscore_passthrough_gen
distros:
- rhel80-xlarge
- name: change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough_gen
distros:
- rhel80-xlarge
- name: change_streams_change_collection_replica_sets_stepdown_primary_jscore_passthrough_gen
distros:
- rhel80-xlarge
- name: change_streams_change_collection_replica_sets_kill_secondary_jscore_passthrough_gen
distros:
- rhel80-xlarge
- name: retryable_writes_jscore_passthrough_gen
- name: retryable_writes_jscore_stepdown_passthrough_gen
distros:
- rhel80-medium
- name: .read_only
- name: .rollbackfuzzer
- name: sasl
- name: search
- name: search_auth
- name: search_pinned_connections_auth
- name: search_ssl
- name: session_jscore_passthrough
- name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
- name: .sharding .jscore !.wo_snapshot !.multi_stmt
- name: sharding_api_version_jscore_passthrough_gen
- name: sharding_api_strict_passthrough_gen
- name: .sharding .txns
- name: .sharding .common
- name: .updatefuzzer
- name: secondary_reads_passthrough_gen
- name: .serverless
distros:
- rhel80-xlarge
- name: vector_search
- name: vector_search_auth
- name: vector_search_ssl
- &rhel80-debug-aubsan-lite-template
<<: *linux_debug_aubsan_compile_variant_dependency
name: &rhel80-debug-aubsan-lite rhel80-debug-aubsan-lite
display_name: "! Shared Library {A,UB}SAN Enterprise RHEL 8.0 DEBUG"
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
modules:
- enterprise
run_on:
- rhel80-build
expansions: &aubsan-lite-required-expansions
compile_variant: *linux_debug_aubsan_compile_variant_name
lang_environment: LANG=C
san_options: *aubsan_options
test_flags: --excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
resmoke_jobs_factor: 0.3 # Avoid starting too many mongod's under {A,UB}SAN build.
hang_analyzer_dump_core: false
max_sub_suites: 3
num_scons_link_jobs_available: 0.99
large_distro_name: rhel80-build
multiversion_platform: rhel80
multiversion_edition: enterprise
gcov_tool: /opt/mongodbtoolchain/v4/bin/gcov
tasks:
- name: jsCore
- name: jsCore_txns
- <<: *enterprise-amazon-linux2-arm64-all-feature-flags-template
name: &commit-queue commit-queue
display_name: "~ Commit Queue"
cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
stepback: false
expansions:
<<: *linux_arm64_generic_expansions
scons_cache_scope: shared
scons_cache_mode: all
commit_queue_alternate_cache: amazon-linux2-arm64-compile
has_packages: false
compile_flags: >-
--ssl
MONGO_DISTMOD=amazon2
-j$(grep -c ^processor /proc/cpuinfo)
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
--link-model=dynamic
crypt_task_compile_flags: >-
SHLINKFLAGS_EXTRA="-Wl,-Bsymbolic
-Wl,--no-gnu-unique"
CCFLAGS="-fno-gnu-unique"
clang_tidy_toolchain: v4
num_scons_unit_cc_jobs_available: 0.75
compile_variant: *commit-queue
depends_on: []
tasks:
- name: compile_ninja_quick_TG
- name: compile_test_parallel_core_stream_TG
distros:
- amazon2-arm64-xlarge-commitqueue
- name: compile_test_parallel_unittest_stream_TG
distros:
- amazon2-arm64-xlarge-commitqueue
- name: compile_test_parallel_dbtest_stream_TG
distros:
- amazon2-arm64-xlarge-commitqueue
- name: jsCore
distros:
- amazon2-arm64-large
- name: .lint
- name: test_api_version_compatibility
- name: validate_commit_message
- name: lint_large_files_check
- name: check_feature_flag_tags
- name: resmoke_validation_tests
- name: version_gen_validation
distros:
- ubuntu2004-small

View File

@ -0,0 +1,138 @@
####################################################
# configuration.yml #
#####################################################
#
# This file contains global configuration values set for the mongodb-mongo-master and
# mongodb-mongo-master-nightly projects.
#
command_type: system
exec_timeout_secs: 21600 # 6 hours.
oom_tracker: true
pre_error_fails_task: true
stepback: true
## Parameters for parameterized builds (see https://github.com/evergreen-ci/evergreen/wiki/Parameterized-Builds)
parameters:
- key: patch_compile_flags
description: "Additional SCons flags to be applied during scons compile invocations in this patch"
- key: future_git_tag
description: "Future git tag to be added. If empty, we will use the most recent git tag instead."
- key: last_lts_evg_version_id
description: "The Evergreen Version ID of the last-lts MongoDB binaries. Only binaries from release variants are used"
- key: last_continuous_evg_version_id
description: "The Evergreen Version ID of the last-continuous MongoDB binaries. Only binaries from release variants are used"
- key: antithesis_image_tag
description: "The docker tag to use when pushing images to Antithesis"
- key: build_patch_id
description: "Patch id of evergreen patch to pull binaries from for testing."
## Cron parameters.
- key: project_required_suggested_cron
value: "0 */4 * * *" # Every 4 hours starting at 0000 UTC
description: "Cron schedule for required and suggested variants"
- key: project_nightly_cron
value: "0 4 * * *" # Every day starting at 0400 UTC
description: "Cron schedule for nightly variants"
- key: project_weekly_cron
value: "0 4 * * 0" # Every week starting 0400 UTC Sunday
description: "Cron schedule for nightly variants"
#######################################
# Modules #
#######################################
# if a module is added and to be added to the manifest
# be sure to add the module to git.get_project revisions parameter
modules:
- name: enterprise
repo: git@github.com:10gen/mongo-enterprise-modules.git
prefix: src/mongo/db/modules
branch: v7.2
- name: wtdevelop
repo: git@github.com:wiredtiger/wiredtiger.git
prefix: src/third_party
branch: develop
- name: dsi
repo: git@github.com:10gen/dsi.git
prefix: ${workdir}/src
branch: master
- name: genny
repo: git@github.com:10gen/genny.git
prefix: ${workdir}/src
branch: master
- name: workloads
repo: git@github.com:10gen/workloads.git
prefix: ${workdir}/src
branch: master
- name: linkbench
repo: git@github.com:10gen/linkbench.git
prefix: ${workdir}/src
branch: master
- name: linkbench2
repo: git@github.com:10gen/linkbench2.git
prefix: ${workdir}/src
branch: master
- name: tsbs
repo: git@github.com:mongodb-forks/tsbs.git
prefix: ${workdir}/src
branch: main
- name: YCSB
repo: git@github.com:mongodb-labs/YCSB.git
prefix: ${workdir}/src
branch: production
- name: flamegraph
repo: git@github.com:mongodb-forks/flamegraph.git
prefix: ${workdir}/src
branch: master
- name: PrivateWorkloads
repo: git@github.com:10gen/PrivateWorkloads.git
prefix: ${workdir}/src
branch: production
# Pre task steps
pre:
- func: "set task expansion macros"
- func: "f_expansions_write"
# Post task steps
post:
- func: "f_expansions_write"
- func: "upload npm logs"
- func: "attach local resmoke invocation"
- func: "attach multiversion exclude tags"
- func: "attach report"
- func: "attach task errors"
- func: "attach artifacts"
- func: "save ec2 task artifacts"
- func: "attach wiki page"
- func: "upload docker compose"
- func: "upload jstestfuzz minimized output"
- func: "kill processes"
- func: "save local client logs"
- func: "save jepsen artifacts"
- func: "save mongo coredumps"
- func: "generate hang analyzer tasks"
- func: "save failed unittests"
- func: "save hang analyzer debugger files"
- func: "save disk statistics"
- func: "save system resource information"
- func: "save UndoDB recordings"
- func: "umount shared scons directory"
- func: "umount tmp directory"
- func: "cleanup FUSE watchdog"
- func: "cleanup environment"
- func: "cleanup jepsen docker test"
# Timeout steps
timeout:
- func: "f_expansions_write"
- func: "run hang analyzer"
- func: "wait for resmoke to shutdown"

View File

@ -5,12 +5,6 @@
# Any global task, function, or taskgroup definition can be added here. Note that if
# the definition is added to another file, YAML anchors from this file can't be used.
command_type: system
exec_timeout_secs: 21600 # 6 hours.
oom_tracker: true
pre_error_fails_task: true
stepback: true
# Files that match an ignore-list pattern will not trigger a build, if they're the only modified
# files in the patch.
@ -27,92 +21,6 @@ ignore:
- "!/etc/evergreen.yml"
- "README"
## Parameters for parameterized builds (see https://github.com/evergreen-ci/evergreen/wiki/Parameterized-Builds)
parameters:
- key: patch_compile_flags
description: "Additional SCons flags to be applied during scons compile invocations in this patch"
- key: future_git_tag
description: "Future git tag to be added. If empty, we will use the most recent git tag instead."
- key: last_lts_evg_version_id
description: "The Evergreen Version ID of the last-lts MongoDB binaries. Only binaries from release variants are used"
- key: last_continuous_evg_version_id
description: "The Evergreen Version ID of the last-continuous MongoDB binaries. Only binaries from release variants are used"
- key: antithesis_image_tag
description: "The docker tag to use when pushing images to Antithesis"
- key: build_patch_id
description: "Patch id of evergreen patch to pull binaries from for testing."
## Cron parameters.
- key: project_required_suggested_cron
value: "0 */4 * * *" # Every 4 hours starting at 0000 UTC
description: "Cron schedule for required and suggested variants"
- key: project_nightly_cron
value: "0 4 * * *" # Every day starting at 0400 UTC
description: "Cron schedule for nightly variants"
- key: project_weekly_cron
value: "0 4 * * 0" # Every week starting 0400 UTC Sunday
description: "Cron schedule for nightly variants"
#######################################
# Modules #
#######################################
# if a module is added and to be added to the manifest
# be sure to add the module to git.get_project revisions parameter
modules:
- name: enterprise
repo: git@github.com:10gen/mongo-enterprise-modules.git
prefix: src/mongo/db/modules
branch: master
- name: wtdevelop
repo: git@github.com:wiredtiger/wiredtiger.git
prefix: src/third_party
branch: develop
- name: dsi
repo: git@github.com:10gen/dsi.git
prefix: ${workdir}/src
branch: master
- name: genny
repo: git@github.com:10gen/genny.git
prefix: ${workdir}/src
branch: master
- name: workloads
repo: git@github.com:10gen/workloads.git
prefix: ${workdir}/src
branch: master
- name: linkbench
repo: git@github.com:10gen/linkbench.git
prefix: ${workdir}/src
branch: master
- name: linkbench2
repo: git@github.com:10gen/linkbench2.git
prefix: ${workdir}/src
branch: master
- name: tsbs
repo: git@github.com:mongodb-forks/tsbs.git
prefix: ${workdir}/src
branch: main
- name: YCSB
repo: git@github.com:mongodb-labs/YCSB.git
prefix: ${workdir}/src
branch: production
- name: flamegraph
repo: git@github.com:mongodb-forks/flamegraph.git
prefix: ${workdir}/src
branch: master
- name: PrivateWorkloads
repo: git@github.com:10gen/PrivateWorkloads.git
prefix: ${workdir}/src
branch: production
#######################################
# Variable #
#######################################
@ -676,7 +584,7 @@ functions:
"get buildnumber": &get_buildnumber
command: keyval.inc
params:
key: "${build_variant}_master"
key: "${build_variant}_v7.2"
destination: "builder_num"
"run diskstats": &run_diskstats
@ -1637,60 +1545,6 @@ functions:
args:
- "./src/evergreen/jepsen_docker/cleanup.sh"
"f_dsi_pre_run":
- command: manifest.load
- command: expansions.update
params:
updates: []
"f_dsi_post_run":
- command: shell.exec
params:
script: ./src/dsi/run-dsi post_run
- command: perf.send
params:
file: ./build/CedarReports/cedar_report.json
aws_key: ${aws_key}
aws_secret: ${aws_secret}
bucket: genny-metrics
region: us-east-1
prefix: ${task_id}_${execution}
- command: attach.results
params:
file_location: ./build/EvergreenResultsJson/results.json
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: ./build/Artifacts/DSIArtifacts.tgz
remote_file: ${project}/${build_variant}/${revision}/${task_id}/${version_id}/logs/dsi-artifacts-${task_name}-${build_id}-${execution}.tgz
bucket: mciuploads
permissions: public-read
content_type: application/x-gzip
display_name: DSI Artifacts - Execution ${execution}
# TODO: https://jira.mongodb.org/browse/EVG-21107
# - command: s3.put
# params:
# aws_key: ${aws_key}
# aws_secret: ${aws_secret}
# local_file: ./build/Documentation/index.html
# remote_file: ${project_dir}/${build_variant}/${revision}/${task_id}/${version_id}/logs/${task_name}-${build_id}-index.html
# bucket: mciuploads
# permissions: public-read
# content_type: text/html
# display_name: Documentation
# TODO https://jira.mongodb.org/browse/PERF-4829
# - command: s3.put
# params:
# aws_key: ${aws_key}
# aws_secret: ${aws_secret}
# local_file: bootstrap.yml
# remote_file: ${project}/${build_variant}/${revision}/${task_id}/${version_id}/bootstrap-${task_name}-${build_id}-${execution}.yml
# bucket: mciuploads
# permissions: public-read
# content_type: text/plain
# display_name: Task Bootstrap Config
"run jepsen test":
- *f_expansions_write
- command: subprocess.exec
@ -1944,6 +1798,7 @@ functions:
- "src/evergreen/run_python_script.sh"
- "buildscripts/package_test.py"
- "release"
- "--evg-project=${project}"
"set up EC2 instance": &set_up_ec2_instance
@ -2187,24 +2042,6 @@ functions:
- *tar_jepsen_mongos_logs
- *archive_jepsen_mongos_logs
"save blackduck artifacts":
- command: archive.targz_pack
params:
target: blackduck.tgz
source_dir: /home/ec2-user/blackduck/runs/
include:
- "**"
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: blackduck.tgz
remote_file: ${project}/${build_variant}/${version_id}/blackduck-${task_id}-${execution}.tgz
bucket: mciuploads
permissions: public-read
content_type: ${content_type|application/gzip}
display_name: BlackDuck logs
### Process & archive mongo coredumps ###
"gather mongo coredumps": &gather_mongo_coredumps
command: subprocess.exec
@ -2739,55 +2576,10 @@ functions:
args:
- "./src/evergreen/antithesis_image_build_and_push.sh"
# Pre task steps
pre:
- func: "set task expansion macros"
- func: "f_expansions_write"
- func: "f_dsi_pre_run"
# Post task steps
post:
- func: "f_expansions_write"
- func: "upload npm logs"
- func: "attach local resmoke invocation"
- func: "attach multiversion exclude tags"
- func: "attach report"
- func: "attach task errors"
- func: "attach artifacts"
- func: "save ec2 task artifacts"
- func: "attach wiki page"
- func: "upload docker compose"
- func: "upload jstestfuzz minimized output"
- func: "kill processes"
- func: "save local client logs"
- func: "save jepsen artifacts"
- func: "save blackduck artifacts"
- func: "save mongo coredumps"
- func: "generate hang analyzer tasks"
- func: "save failed unittests"
- func: "save hang analyzer debugger files"
- func: "save disk statistics"
- func: "save system resource information"
- func: "save UndoDB recordings"
- func: "umount shared scons directory"
- func: "umount tmp directory"
- func: "cleanup FUSE watchdog"
- func: "cleanup environment"
- func: "cleanup jepsen docker test"
- func: "f_dsi_post_run"
# Timeout steps
timeout:
- func: "f_expansions_write"
- func: "run hang analyzer"
- func: "wait for resmoke to shutdown"
#######################################
# Tasks #
#######################################
tasks:
## compile - build all scons targets except unittests ##
- name: compile_dist_test
tags: []
@ -2950,6 +2742,8 @@ tasks:
- "./build/**_bm.gcno"
- "./build/**_bm.exe"
- "./build/**_bm.pdb"
- "./build/**.so"
- "./build/**.debug"
- command: s3.put
params:
aws_key: ${aws_key}
@ -4202,18 +3996,6 @@ tasks:
resmoke_jobs_max: 1
- func: "send benchmark results"
- <<: *benchmark_template
name: benchmarks_streams
tags: ["benchmarks"]
commands:
- func: "do benchmark setup"
- func: "run tests"
vars:
suites: benchmarks_streams
exec_timeout_secs: 18000 # 5 hour timeout.
resmoke_jobs_max: 1
- func: "send benchmark results"
- <<: *run_jepsen_template
name: jepsen_register_findAndModify
tags: ["jepsen"]
@ -7977,26 +7759,6 @@ tasks:
- func: "upload pip requirements"
- func: "run idl tests"
- name: blackduck_scanner
tags: []
patchable: false
commands:
- *f_expansions_write
- func: "do non-compile setup"
- command: subprocess.exec
type: setup
params:
binary: bash
silent: true
args:
- "src/evergreen/blackduck_setup.sh"
- command: subprocess.exec
type: test
params:
binary: bash
args:
- "src/evergreen/blackduck_hub.sh"
- name: tla_plus
tags: []
commands:
@ -8241,6 +8003,7 @@ tasks:
- command: shell.exec
params:
shell: bash
silent: true
script: |
set -oe
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
@ -8311,6 +8074,7 @@ tasks:
- command: shell.exec
params:
shell: bash
silent: true
script: |
set -oe
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
@ -8849,6 +8613,7 @@ tasks:
- command: shell.exec
params:
shell: bash
silent: true
script: |
set -oe
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
@ -9587,6 +9352,13 @@ task_groups:
# - compile_all_but_not_unittests
# - package
- <<: *compile_task_group_template
name: compile_and_package_serial_no_unittests_TG
tasks:
- compile_dist_test
- archive_dist_test
- archive_dist_test_debug
# SERVER-76006
# This is a compile stream meant for non-cached and/or underpowered systems.
# It joins most of the compile tasks together under a single host spread out

View File

@ -17,6 +17,7 @@ functions:
- command: expansions.write
params:
file: ./expansions.yml
redacted: true
- command: shell.exec
params:
script: ./src/dsi/run-dsi run_workload
@ -174,7 +175,7 @@ tasks:
# Run the script to generate ssl cert files
- command: shell.exec
params:
script: AWS_ACCESS_KEY_ID=${perf_terraform_key} AWS_SECRET_ACCESS_KEY=${terraform_secret} ./src/dsi/run-dsi generate_ssl_cert
script: AWS_ACCESS_KEY_ID=${terraform_key} AWS_SECRET_ACCESS_KEY=${terraform_secret} ./src/dsi/run-dsi generate_ssl_cert
# Upload files for further DSI usage
- command: s3.put
params:
@ -201,26 +202,75 @@ tasks:
content_type: text/plain
display_name: root.crt
- name: industry_benchmarks
- name: ycsb.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb"
test_control: "ycsb.2023-09"
- name: ycsb_60GB
- name: ycsb_60GB.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb-60GB"
test_control: "ycsb-60GB.2023-09"
- name: ycsb_60GB.long
- name: ycsb_60GB.long.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb-60GB.long"
test_control: "ycsb-60GB.long.2023-09"
- name: ycsb_secondary_reads.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb-secondary-reads.2023-09"
- name: ycsb_single_thread
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb-single-thread"
- name: ycsb_w1.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb-w1.2023-09"
- name: ycsb_stepdowns.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb_stepdowns.2023-09"
- name: ycsb_rolling_restarts.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb_rolling_restarts.2023-09"
- name: ycsb_non_retryable_writes_stepdowns.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb_non_retryable_writes_stepdowns.2023-09"
- name: ycsb_non_retryable_writes_rolling_restarts.2023-09
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ycsb_non_retryable_writes_rolling_restarts.2023-09"
- name: linkbench
priority: 5
@ -266,6 +316,13 @@ tasks:
test_control: "linkbench2"
additional_tfvars: "tags: {expire-on-delta: 12}"
- name: locust_bulk_insert
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "locust_bulk_insert"
- name: tsbs_load
priority: 5
commands:
@ -357,6 +414,16 @@ tasks:
{task_name: tsbs_query_optimizations,
config_filename: ./src/genny/dist/etc/genny/workloads/query/TimeseriesTsbsOptimizations.yml}
- name: tsbs-expression-query
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "tsbs_query_genny"
test_control_params: |
{task_name: tsbs_expression_query,
config_filename: ./src/genny/dist/etc/genny/workloads/query/TimeseriesTsbsExpressionQuery.yml}
- name: tpcc
priority: 5
commands:
@ -385,6 +452,51 @@ tasks:
vars:
test_control: "crud_workloads_majority"
- name: cursor_manager
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "cursor_manager"
- name: mixed_workloads_genny_stepdowns
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "mixed_workloads_genny_stepdowns"
- name: mixed_workloads_genny_rolling_restarts
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "mixed_workloads_genny_rolling_restarts"
- name: big_update_10k
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "BigUpdate10k"
- name: startup
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "startup"
- name: dbcheck
priority: 5
exec_timeout_secs: 43200 # 12 hours
commands:
- func: f_dsi_run_workload
timeout_secs: 43200 # 12 hours
vars:
test_control: "dbcheck"
additional_tfvars: "tags: {expire-on-delta: 12}" # increase host expiration to 12 hours.
- name: misc_workloads
priority: 5
commands:
@ -406,13 +518,6 @@ tasks:
vars:
test_control: canaries
- name: non_sharded_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "non_sharded"
- name: bestbuy_agg
priority: 5
commands:
@ -475,41 +580,6 @@ tasks:
{scale: 4,
columnstore: true}
- name: change_streams_latency
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_latency"
- name: change_streams_preimage_throughput
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_preimage_throughput"
- name: change_streams_preimage_latency
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_preimage_latency"
- name: change_streams_listen_throughput
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_listen_throughput"
- name: change_streams_multi_mongos
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_multi_mongos"
- name: snapshot_reads
priority: 5
commands:
@ -517,6 +587,13 @@ tasks:
vars:
test_control: "snapshot_reads"
- name: secondary_reads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "secondary_reads"
- name: tpch_1_normalized
priority: 5
commands:
@ -558,3 +635,644 @@ tasks:
test_control_params: |
{scale: 10,
schema: denormalized}
- name: ssb_column_store_comparison
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "ssb_column_store_index"
test_control_params: |
{scale: 5}
- name: column_store_tpch_10_denormalized
priority: 5
exec_timeout_secs: 43200 # 12 hours
commands:
- func: f_dsi_run_workload
vars:
test_control: "column_store_tpch"
test_control_params: |
{scale: 10,
schema: denormalized,
columnstore: true}
- name: column_store_tpch_10_denormalized_unindexed
priority: 5
exec_timeout_secs: 43200 # 12 hours
commands:
- func: f_dsi_run_workload
vars:
test_control: "column_store_tpch"
test_control_params: |
{scale: 10,
schema: denormalized,
columnstore: false}
- name: mixed_workloads_genny_rate_limited_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: mixed_workloads_genny_rate_limited
auto_workload_path: ./src/genny/dist/etc/genny/workloads/scale/MixedWorkloadsGennyRateLimited.yml
- name: load_test_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: load_test
auto_workload_path: ./src/genny/dist/etc/genny/workloads/scale/LoadTest.yml
- name: majority_reads10_k_threads_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: majority_reads10_k_threads
auto_workload_path: ./src/genny/dist/etc/genny/workloads/scale/MajorityReads10KThreads.yml
- name: large_indexed_ins_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: large_indexed_ins
auto_workload_path: ./src/genny/dist/etc/genny/workloads/scale/LargeIndexedIns.yml
- name: expressive_queries_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: expressive_queries
auto_workload_path: ./src/genny/dist/etc/genny/workloads/query/ExpressiveQueries.yml
- name: time_series_sort_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: time_series_sort
auto_workload_path: ./src/genny/dist/etc/genny/workloads/query/TimeSeriesSort.yml
- name: medical_workload_diagnosis_50_50_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: medical_workload_diagnosis_50_50
auto_workload_path: ./src/genny/dist/etc/genny/workloads/encrypted/medical_workload-diagnosis-50-50.yml
- name: ycsb_like_queryable_encrypt1_cfdefault_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: ycsb_like_queryable_encrypt1_cfdefault
auto_workload_path: ./src/genny/dist/etc/genny/workloads/encrypted/YCSBLikeQueryableEncrypt1Cfdefault.yml
- name: filter_with_complex_logical_expression_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: filter_with_complex_logical_expression
auto_workload_path: ./src/genny/dist/etc/genny/workloads/query/FilterWithComplexLogicalExpression.yml
- name: array_traversal_high_value
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: array_traversal
auto_workload_path: ./src/genny/dist/etc/genny/workloads/query/ArrayTraversal.yml
# TODO PERF-3094: Remove these charts_events tasks.
- name: column_store_index_charts_events_1G
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "charts_events"
test_control_params: |
{scale: 1}
- name: column_store_index_charts_events_10G
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "charts_events"
test_control_params: |
{scale: 10}
# TODO PERF-3094: Remove this task.
- name: bestbuy_4_inserts
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "bestbuy_4_inserts"
- name: non_sharded_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "non_sharded"
- name: mongos_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "mongos"
- name: mongos_large_catalog_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "mongos_large_catalog"
- name: move_chunk_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "move_chunk"
- name: move_chunk_waiting_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "move_chunk_waiting"
- name: move_chunk_large_chunk_map_workloads
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "move_chunk_large_chunk_map"
- name: refine_shard_key_transaction_stress
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "refine_shard_key_transaction_stress"
- name: secondary_performance
priority: 5
commands:
- func: f_dsi_run_workload
vars:
# Unfortunately the dash/underscore style is different for mongodb_setup and test_control
test_control: "secondary_performance"
mongodb_setup: "secondary-performance"
- name: initialsync
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "initialsync"
- name: initialsync-fcbis
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "initialsync"
mongodb_setup: "replica-2node-fcbis"
- name: initialsync-logkeeper
priority: 5
exec_timeout_secs: 43200 # 12 hours
commands:
- func: f_dsi_run_workload
timeout_secs: 43200 # 12 hours
vars:
test_control: "initialsync-logkeeper"
- name: initialsync-logkeeper-fcbis
priority: 5
exec_timeout_secs: 43200 # 12 hours
commands:
- func: f_dsi_run_workload
timeout_secs: 43200 # 12 hours
vars:
test_control: "initialsync-logkeeper"
mongodb_setup: "initialsync-logkeeper-fcbis"
# The following two initial sync logkeeper automation tasks are only used in the commented-out
# "Linux ReplSet Initial Sync LogKeeper Snapshot Update" variant below and are only intended to be
# run in patch builds to update FCV for logkeeper datasets.
- name: initialsync-logkeeper-snapshot-update
priority: 5
exec_timeout_secs: 216000 # 2.5 days
commands:
- func: f_dsi_run_workload
vars:
test_control: "initialsync-logkeeper-snapshot-update"
- name: initialsync-large
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "initialsync-large"
- name: initialsync-large-fcbis
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "initialsync-large"
mongodb_setup: "replica-2node-fcbis"
- name: change_streams_latency
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_latency"
- name: change_streams_preimage_throughput
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_preimage_throughput"
- name: change_streams_preimage_latency
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_preimage_latency"
- name: change_streams_listen_throughput
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_listen_throughput"
- name: change_streams_multi_mongos
priority: 5
commands:
- func: f_dsi_run_workload
vars:
test_control: "change_streams_multi_mongos"
- name: genny_execution_UserAcquisition
commands:
- func: f_dsi_run_workload
vars:
test_control: auto_genny_workload
auto_workload_path: ./src/genny/dist/etc/genny/workloads/execution/UserAcquisition.yml
- name: genny_scale_InsertRemove
commands:
- func: f_dsi_run_workload
vars:
test_control: auto_genny_workload
auto_workload_path: ./src/genny/dist/etc/genny/workloads/scale/InsertRemove.yml
- name: genny_resharding_withIndexes
exec_timeout_secs: 172800 # 2 days
commands:
- func: f_dsi_run_workload
vars:
test_control: auto_genny_workload
auto_workload_path: ./src/genny/dist/etc/genny/workloads/sharding/ReshardCollectionWithIndexes.yml
- name: query_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: query,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: query_read_commands_large_dataset
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: query_large_dataset,
include_filter_2: regression,
exclude_filter: none,
threads: "1 4",
read_cmd: 'true',
share_dataset: 'true'}
- name: big_collection
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: query,
include_filter_2: getmore,
exclude_filter: none,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: views-query
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: query_identityview,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: views-aggregation
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: aggregation_identityview,
include_filter_2: regression,
exclude_filter: none,
threads: "1",
read_cmd: 'true'}
- name: where_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: where,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: update_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: update,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: insert_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: insert,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: compound_wildcard_index_write_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: compound-wildcard-insert compound-wildcard-remove compound-wildcard-update,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: compound_wildcard_index_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: compound-wildcard-query,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: wildcard-index-read_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: wildcard_read,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: wildcard-index-write_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: wildcard_write,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: tie-breaking-heuristics
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: tie-breaking,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: geo_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: geo,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: misc_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: command multi remove mixed,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: misc_custom_filter_default_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
mongodb_setup: mongo-perf-standalone-custom-filter-default.2023-02
test_control_params: |
{include_filter_1: command multi remove mixed,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: misc_custom_filter_slow_or_sample_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
mongodb_setup: mongo-perf-standalone-custom-filter-slow-or-sample.2023-02
test_control_params: |
{include_filter_1: command multi remove mixed,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: misc_custom_filter_complex_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
mongodb_setup: mongo-perf-standalone-custom-filter-complex.2023-02
test_control_params: |
{include_filter_1: command multi remove mixed,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: misc_custom_filter_whole_doc_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
mongodb_setup: mongo-perf-standalone-custom-filter-whole-doc.2023-02
test_control_params: |
{include_filter_1: command multi remove mixed,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: misc_slowms_everything_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
mongodb_setup: mongo-perf-standalone-slowms-everything.2023-02
test_control_params: |
{include_filter_1: command multi remove mixed,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: singleThreaded_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: single_threaded,
include_filter_2: core regression,
exclude_filter: none,
threads: "1",
read_cmd: 'true'}
- name: aggregation_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: aggregation,
include_filter_2: regression,
exclude_filter: js,
threads: "1",
read_cmd: 'true'}
- name: aggregation_read_commands_large_dataset
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: aggregation_large_dataset,
include_filter_2: regression,
exclude_filter: js,
threads: "1 4",
read_cmd: 'true',
share_dataset: 'true'}
- name: agg-query-comparison_read_commands
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: agg_query_comparison,
include_filter_2: core regression,
exclude_filter: single_threaded,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: pipeline-updates
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: pipeline-updates,
include_filter_2: regression,
exclude_filter: none,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: javascript
commands:
- func: f_dsi_run_workload
vars:
test_control: mongo-perf.2023-02
test_control_params: |
{include_filter_1: js,
include_filter_2: aggregation,
exclude_filter: none,
threads: "1 2 4 8",
read_cmd: 'true'}
- name: stream_workloads
commands:
- func: f_dsi_run_workload
vars:
test_control: streams.2023-10

View File

@ -33,6 +33,7 @@ variables:
idle_timeout_factor: 1.5
exec_timeout_factor: 1.5
large_distro_name: rhel80-medium
core_analyzer_distro_name: rhel80-large
burn_in_tag_buildvariants: >-
enterprise-rhel-80-64-bit-inmem
enterprise-rhel-80-64-bit-multiversion

View File

@ -25,7 +25,7 @@ variables:
- enterprise
stepback: false
- &linux-x86-compile-params # Essential set of compile parameters used for Linux dev variants.
- &amazon2-x86-compile-params # Essential set of compile parameters used for Linux dev variants.
run_on:
- amazon2
activate: true # These compile variants run on every commit to reduce latency of the auto-reverter.
@ -44,7 +44,7 @@ variables:
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
--link-model=dynamic
- &linux-x86-compile-expansions
- &amazon2-x86-compile-expansions
scons_cache_scope: shared
scons_cache_mode: all
has_packages: false
@ -115,14 +115,14 @@ buildvariants:
distros:
- rhel80-large
- <<: *linux-x86-compile-params
name: &linux-x86-compile linux-x86-compile #static compile
display_name: "Linux x86 Static Library"
- <<: *amazon2-x86-compile-params
name: &amazon2-x86-compile amazon2-x86-compile #static compile
display_name: "Amazon2 x86 Static Compile"
expansions:
<<: *linux-x86-compile-expansions
compile_variant: *linux-x86-compile
<<: *amazon2-x86-compile-expansions
compile_variant: *amazon2-x86-compile
tasks:
- name: compile_test_parallel_core_stream_TG
- name: compile_and_package_serial_no_unittests_TG
- name: generate_buildid_to_debug_symbols_mapping
- name: run_pretty_printer_tests
@ -133,25 +133,10 @@ buildvariants:
<<: *amazon-linux2-arm64-compile-expansions
compile_variant: *amazon-linux2-arm64-compile
tasks:
- name: compile_test_parallel_core_stream_TG
- name: compile_and_package_serial_no_unittests_TG
- name: generate_buildid_to_debug_symbols_mapping
- name: run_pretty_printer_tests
- <<: *generic_linux_compile_params
name: &linux-x86-dynamic-compile-future-tag-multiversion linux-x86-dynamic-compile-future-tag-multiversion
display_name: "Linux x86 Shared Library Compile (future git tag multiversion)"
modules:
- enterprise
expansions:
<<: *linux-x86-dynamic-compile-expansions
bv_future_git_tag: r100.0.0-9999
compile_variant: *linux-x86-dynamic-compile-future-tag-multiversion
depends_on:
- name: version_expansions_gen
variant: enterprise-rhel-80-64-bit-future-git-tag-multiversion-version-gen
tasks:
- name: compile_test_serial_TG
- <<: *generic_linux_compile_params
name: &linux-x86-dynamic-debug-compile-required linux-x86-dynamic-debug-compile-required # TODO: replace with Sanitizer.
display_name: "! Linux x86 Shared Library DEBUG Compile"
@ -173,17 +158,6 @@ buildvariants:
- name: compile_test_parallel_dbtest_stream_TG
- name: generate_buildid_to_debug_symbols_mapping
- <<: *generic_linux_compile_params
name: &linux-x86-dynamic-debug-wtdevelop-compile linux-x86-dynamic-debug-wtdevelop-compile
display_name: "~ Linux WiredTiger develop DEBUG Compile"
activate: false
modules:
- wtdevelop
expansions:
<<: *linux_debug_compile_expansions
use_wt_develop: true
compile_variant: *linux-x86-dynamic-debug-wtdevelop-compile
- <<: *generic_linux_compile_params
name: &linux-debug-aubsan-compile-required linux-debug-aubsan-compile-required
display_name: "! Linux x86 Shared Library {A,UB}SAN Enterprise Compile"

View File

@ -37,6 +37,7 @@ variables:
idle_timeout_factor: 1.5
exec_timeout_factor: 1.5
large_distro_name: rhel80-medium
core_analyzer_distro_name: rhel80-large
buildvariants:
- &enterprise-rhel-80-64-bit-dynamic-config-shard

View File

@ -2031,6 +2031,29 @@ buildvariants:
- ubuntu2004-package
- name: generate_buildid_to_debug_symbols_mapping
- name: enterprise-ubuntu1804-64
display_name: Jepsen Tests on Enterprise Ubuntu 18.04
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
modules:
- enterprise
run_on:
- ubuntu1804-small
expansions:
compile_flags: >-
--ssl
MONGO_DISTMOD=ubuntu1804
-j$(grep -c ^processor /proc/cpuinfo)
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
scons_cache_scope: shared
large_distro_name: ubuntu1804-large
compile_variant: enterprise-ubuntu1804-64
tasks:
- name: compile_and_archive_dist_test_TG
distros:
- ubuntu1804-large
- name: .jepsen
distros:
- ubuntu1804-large
- name: ubuntu2204
display_name: Ubuntu 22.04
@ -2873,14 +2896,3 @@ buildvariants:
- name: streams
- name: streams_auth
- name: streams_kafka
- name: &security-daily-cron security-daily-cron
modules:
- enterprise
display_name: "~ Security Daily Cron"
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
run_on:
- rhel80-small
stepback: false
tasks:
- name: blackduck_scanner

View File

@ -0,0 +1,352 @@
variables:
- &amazon2_x86_compile_variant_dependency
depends_on:
- name: schedule_global_auto_tasks
variant: task_generation
- name: package_new_compile
variant: amazon2-x86-compile
- &amazon_linux2_arm64_compile_variant_dependency
depends_on:
- name: schedule_global_auto_tasks
variant: task_generation
- name: package_new_compile
variant: amazon2-arm64-compile
- &rhel70_x86_compile_variant_dependency
depends_on:
- name: schedule_global_auto_tasks
variant: task_generation
- name: package_new_compile
variant: rhel70-x86-compile
- modules: &perf_modules
- enterprise
- dsi
- genny
- workloads
- linkbench
- linkbench2
- tsbs
- mongo-perf
- YCSB
- PrivateWorkloads
- py-tpcc
- flamegraph
buildvariants:
- <<: *amazon_linux2_arm64_compile_variant_dependency
name: perf-atlas-M60-real.arm.aws.2023-11
display_name: PERF M60-Atlas ReplSet ARM AWS 2023-11
cron: "0 0 * * 0,4" # 00:00 on Sunday, Thursday
modules: *perf_modules
expansions:
mongodb_setup: atlas
canaries: none
atlas_setup: M60-repl
use_custom_build: true
infrastructure_provisioning: workload_client_arm.2023-04
infrastructure_provisioning_release: 2023-09
workload_setup: 2022-11
platform: linux
project_dir: &perf_project_dir dsi
storageEngine: wiredTiger
compile_variant: amazon2-arm64-compile
run_on:
- "rhel70-perf-atlas-large"
tasks:
- name: schedule_patch_auto_tasks
- name: schedule_variant_auto_tasks
- name: ycsb.2023-09
- name: ycsb_60GB.2023-09
- name: tpcc
- name: tpcc_majority
- name: linkbench
- name: linkbench2
- <<: *amazon2_x86_compile_variant_dependency
name: perf-atlas-M60-real.intel.azure.2023-11
display_name: PERF M60-Atlas ReplSet Intel Azure 2023-11
cron: "0 0 * * 0,4" # 00:00 on Sunday, Thursday
modules: *perf_modules
expansions:
mongodb_setup: atlas
canaries: none
atlas_setup: M60-repl-azure
use_custom_build_azure: true
compile_variant: amazon2-x86-compile
infrastructure_provisioning: workload_client_intel.2023-11
infrastructure_provisioning_release: 2023-09
workload_setup: 2022-11
platform: linux
project_dir: *perf_project_dir
storageEngine: wiredTiger
run_on:
- "rhel70-perf-atlas-large"
tasks: # Cannot use *3nodetasks because secondary_performance uses a special mongodb setup
- name: schedule_patch_auto_tasks
- name: schedule_variant_auto_tasks
- name: ycsb.2023-09
- name: ycsb_60GB.2023-09
- name: tpcc
- name: tpcc_majority
- name: linkbench
- name: linkbench2
- <<: *amazon_linux2_arm64_compile_variant_dependency
name: perf-3-shard.arm.aws.2023-11
display_name: PERF 3-Shard Cluster ARM AWS 2023-11
cron: "0 0 * * 4" # 00:00 on Thursday
modules: *perf_modules
expansions:
mongodb_setup_release: 2022-11
mongodb_setup: shard
infrastructure_provisioning_release: 2023-09
infrastructure_provisioning: shard
workload_setup: 2022-11
platform: linux
project_dir: *perf_project_dir
authentication: enabled
storageEngine: wiredTiger
compile_variant: amazon2-arm64-compile
run_on:
- "rhel70-perf-shard"
tasks:
- name: schedule_patch_auto_tasks
- name: schedule_variant_auto_tasks
- name: ycsb.2023-09
- name: ycsb_w1.2023-09
- name: crud_workloads_majority
- name: crud_workloads_w1
- name: misc_workloads
- name: map_reduce_workloads
- name: smoke_test
- name: mongos_workloads
- name: mongos_large_catalog_workloads
- name: move_chunk_workloads
- name: change_streams_latency
- name: change_streams_listen_throughput
- name: change_streams_multi_mongos
- name: tsbs_query_sharded
- name: tsbs_query_finance_sharded
- name: tsbs_query_sharded_balancer
- name: tsbs_query_finance_sharded_balancer
- <<: *amazon_linux2_arm64_compile_variant_dependency
name: perf-3-node-replSet.arm.aws.2023-11
display_name: PERF 3-Node ReplSet ARM AWS 2023-11
cron: "0 0 * * 1,2,3,4,5,6" # Everyday except Sunday at 00:00
modules: *perf_modules
expansions:
mongodb_setup_release: 2022-11
mongodb_setup: replica
infrastructure_provisioning_release: 2023-09
infrastructure_provisioning: replica
workload_setup: 2022-11
platform: linux
project_dir: *perf_project_dir
authentication: enabled
storageEngine: wiredTiger
compile_variant: amazon2-arm64-compile
run_on:
- "rhel70-perf-replset"
tasks:
- name: schedule_patch_auto_tasks
- name: schedule_variant_auto_tasks
- name: ycsb.2023-09
- name: ycsb_w1.2023-09
- name: ycsb_60GB.2023-09
- name: ycsb_60GB.long.2023-09
- name: ycsb_secondary_reads.2023-09
- name: crud_workloads_majority
- name: crud_workloads_w1
- name: misc_workloads
- name: map_reduce_workloads
- name: refine_shard_key_transaction_stress
- name: smoke_test
- name: secondary_performance # Uses a special 2 node mongodb setup
- name: non_sharded_workloads
- name: bestbuy_agg
- name: bestbuy_agg_merge_different_db
- name: bestbuy_agg_merge_same_db
- name: bestbuy_agg_merge_wordcount
- name: bestbuy_query
- name: change_streams_preimage_throughput
- name: change_streams_latency
- name: change_streams_preimage_latency
- name: change_streams_listen_throughput
- name: snapshot_reads
- name: secondary_reads
- name: tpcc
- name: tpcc_majority
- name: tpch_1_normalized
- name: tpch_1_denormalized
# TODO: Enable in SERVER-66572.
# - name: tpch_10_normalized
# - name: tpch_10_denormalized
- name: linkbench
- name: linkbench2
- name: tsbs_load
- name: tsbs_query
- name: tsbs_query_finance
- name: tsbs_query_manual_bucketing
- name: tsbs-query-genny
- name: tsbs-query-optimizations
- name: big_update_10k
- name: mixed_workloads_genny_rate_limited_high_value
- name: load_test_high_value
- name: majority_reads10_k_threads_high_value
- name: large_indexed_ins_high_value
- name: expressive_queries_high_value
- name: time_series_sort_high_value
- <<: *amazon2_x86_compile_variant_dependency
name: perf-3-node-replSet-intel.intel.aws.2023-11
display_name: PERF 3-Node ReplSet Intel AWS 2023-11
cron: "0 0 * * 1,2,3,4,5,6" # Everyday except Sunday at 00:00
modules: *perf_modules
expansions:
mongodb_setup_release: 2022-11
mongodb_setup: replica
infrastructure_provisioning_release: 2023-09
infrastructure_provisioning: replica-intel.2023-11
workload_setup: 2022-11
platform: linux
project_dir: *perf_project_dir
authentication: enabled
storageEngine: wiredTiger
compile_variant: amazon2-x86-compile
run_on:
- "rhel70-perf-replset"
tasks:
- name: schedule_patch_auto_tasks
- name: schedule_variant_auto_tasks
- name: ycsb.2023-09
- name: ycsb_60GB.2023-09
- name: crud_workloads_majority
- name: smoke_test
- name: linkbench
- name: linkbench2
- name: mixed_workloads_genny_rate_limited_high_value
# On PERF-730 we changed the initial sync tests to use two nodes instead of three. To avoid
# losing history, the name remains unchanged, but the display_name reflects the change to 2-Node.
- <<: *amazon_linux2_arm64_compile_variant_dependency
name: perf-2-node-replSet-initialsync.arm.aws.2023-11
display_name: PERF 2-Node ReplSet Initial Sync ARM AWS 2023-11
cron: "0 0 * * 4" # 00:00 on Thursday
modules: *perf_modules
expansions:
mongodb_setup_release: 2022-11
mongodb_setup: replica-2node
infrastructure_provisioning_release: 2023-09
infrastructure_provisioning: replica-2node
workload_setup: 2022-11
platform: linux
authentication: disabled
storageEngine: wiredTiger
compile_variant: amazon2-arm64-compile
project_dir: *perf_project_dir
run_on:
- "rhel70-perf-replset"
tasks:
- name: schedule_patch_auto_tasks
- name: schedule_variant_auto_tasks
- name: initialsync-large
- name: initialsync-large-fcbis
- <<: *amazon_linux2_arm64_compile_variant_dependency
name: perf-mongo-perf-standalone.arm.aws.2023-11
display_name: PERF Monogo-Perf Standalone inMemory ARM AWS 2023-11
cron: &linux-microbench-cron "0 0 * * *" # Everyday at 00:00
modules: *perf_modules
expansions:
mongodb_setup_release: 2022-11
mongodb_setup: mongo-perf-standalone.2023-02
infrastructure_provisioning_release: 2023-09
infrastructure_provisioning: workload_client_mongod_combined.2023-01
workload_setup: 2022-11
use_scons_cache: true
platform: linux
canaries: none
storageEngine: inMemory
project_dir: *perf_project_dir
compile_variant: amazon2-arm64-compile
run_on:
- "rhel70-perf-microbenchmarks"
tasks:
- name: big_collection
- name: genny_scale_InsertRemove
- name: genny_execution_UserAcquisition
- name: aggregation_read_commands
- name: aggregation_read_commands_large_dataset
- name: agg-query-comparison_read_commands
- name: query_read_commands
- name: query_read_commands_large_dataset
- name: views-aggregation
- name: views-query
- name: where_read_commands
- name: update_read_commands
- name: insert_read_commands
- name: wildcard-index-read_read_commands
- name: wildcard-index-write_read_commands
- name: geo_read_commands
- name: misc_read_commands
- name: misc_custom_filter_default_read_commands
- name: misc_custom_filter_slow_or_sample_read_commands
- name: misc_custom_filter_complex_read_commands
- name: misc_custom_filter_whole_doc_read_commands
- name: misc_slowms_everything_read_commands
- name: singleThreaded_read_commands
- name: pipeline-updates
- name: javascript
- name: compound_wildcard_index_write_commands
- name: compound_wildcard_index_read_commands
- <<: *amazon2_x86_compile_variant_dependency
name: perf-mongo-perf-standalone.intel.aws.2023-11
display_name: PERF Mongo-Perf Standalone inMemory Intel AWS 2023-11
cron: *linux-microbench-cron
modules: *perf_modules
expansions:
mongodb_setup_release: 2022-11
mongodb_setup: mongo-perf-standalone.2023-02
infrastructure_provisioning_release: 2023-09
infrastructure_provisioning: workload_client_mongod_combined_intel.2023-11
workload_setup: 2022-11
use_scons_cache: true
platform: linux
canaries: none
storageEngine: inMemory
project_dir: *perf_project_dir
compile_variant: amazon2-x86-compile
run_on:
- "rhel70-perf-microbenchmarks"
tasks:
- name: big_collection
- name: genny_scale_InsertRemove
- name: genny_execution_UserAcquisition
- name: aggregation_read_commands
- name: aggregation_read_commands_large_dataset
- name: agg-query-comparison_read_commands
- name: query_read_commands
- name: query_read_commands_large_dataset
- name: views-aggregation
- name: views-query
- name: where_read_commands
- name: update_read_commands
- name: insert_read_commands
- name: wildcard-index-read_read_commands
- name: wildcard-index-write_read_commands
- name: geo_read_commands
- name: misc_read_commands
- name: misc_custom_filter_default_read_commands
- name: misc_custom_filter_slow_or_sample_read_commands
- name: misc_custom_filter_complex_read_commands
- name: misc_custom_filter_whole_doc_read_commands
- name: misc_slowms_everything_read_commands
- name: singleThreaded_read_commands
- name: pipeline-updates
- name: javascript
- name: compound_wildcard_index_write_commands
- name: compound_wildcard_index_read_commands

View File

@ -32,6 +32,7 @@ buildvariants:
--ssl
--ocsp-stapling=off
-j$(grep -c ^processor /proc/cpuinfo)
--link-model=dynamic
multiversion_platform: rhel80
multiversion_edition: enterprise
resmoke_jobs_factor: 0.3 # Avoid starting too many mongod's under ASAN build.
@ -69,6 +70,7 @@ buildvariants:
--ssl
--ocsp-stapling=off
-j$(grep -c ^processor /proc/cpuinfo)
--link-model=dynamic
test_flags: --excludeWithAnyTags=requires_fast_memory,requires_ocsp_stapling,requires_increased_memlock_limits,corrupts_data
multiversion_platform: rhel80
multiversion_edition: enterprise
@ -152,6 +154,7 @@ buildvariants:
--ssl
--ocsp-stapling=off
-j$(grep -c ^processor /proc/cpuinfo)
--link-model=dynamic
test_flags: --excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits,corrupts_data
multiversion_platform: rhel80
multiversion_edition: enterprise

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
cd src
set -o errexit
set -o verbose
# activate the virtualenv if it has been set up
activate_venv
additional_args=
if [ "$branch_name" != "master" ]; then
additional_args="--vulnerabilities_only"
fi
# BlackDuck crashes on this gzip file because it is not well-formed
# invalid compressed data--format violated
rm ./src/third_party/zstandard/zstd/tests/gzip/hufts-segv.gz
# Remove package.json since it only exists for vscode
# MongoDB server does not use Node.JS code so we strip this file to not confuse BlackDuck Detect
# Otherwise we need to run npm install to install everything in package.json or disable the NPM
# scanner.
rm package.json
python buildscripts/blackduck_hub.py -v scan_and_report --build_logger=mci.buildlogger --build_logger_task_id=${task_id} --report_file=report.json $additional_args

View File

@ -1,16 +0,0 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
cd src
# Create the Evergreen API credentials
cat > .restconfig.json << END_OF_CREDS
{
"baseurl": "${blackduck_url}",
"username": "${blackduck_username}",
"password": "${blackduck_password}",
"token": "${blackduck_token}",
"debug": false,
"insecure" : false
}
END_OF_CREDS

View File

@ -24,12 +24,15 @@ cat << EOF > $HOME/azure_e2e_config.json
"oidc_azure_managed_identity_api_version": "${oidc_azure_managed_identity_api_version}"
}
EOF
cat << EOF > $HOME/azure_remote_key
cat << EOF > $HOME/oidc_azure_container_key
${oidc_azure_container_key}
EOF
# EVG project variables do not preserve line breaks - rather these are replaced with spaces, so we will need to convert our pem back into proper format
sed s/\ OPENSSH\ PRIVATE\ KEY/OPENSSHPRIVATEKEY/g $HOME/azure_remote_key | sed s/\ /\\n/g | sed s/OPENSSHPRIVATEKEY/\ OPENSSH\ PRIVATE\ KEY/g > $HOME/azure_remote_key
# EVG project variables do not preserve line breaks so we store them as base64 and decode here
sed s/[[:space:]]//g $HOME/oidc_azure_container_key | base64 --decode > $HOME/azure_remote_key
# Clean up temp file
rm -f $HOME/oidc_azure_container_key
# SSH will complain and fail if the private key permissions are too lenient (by default it is created with 644), so modify to run the test
chmod 600 $HOME/azure_remote_key

View File

@ -13,13 +13,13 @@
* ]
*/
import {aggPlanHasStage, getAggPlanStages} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.server39788;
coll.drop();
assert.commandWorked(db.runCommand({create: coll.getName()}));
const sbeEnabled = checkSBEEnabled(db);
const sbeFullyEnabled = checkSbeFullyEnabled(db);
function testPipeline(pipeline, expectedResult, optimizedAwayStages) {
const explainOutput = coll.explain().aggregate(pipeline);
@ -66,25 +66,27 @@ function testPipeline(pipeline, expectedResult, optimizedAwayStages) {
// values == MAX_LONG, another one is 1.
testPipeline(
[{$sort: {x: -1}}, {$skip: NumberLong("9223372036854775807")}, {$limit: 1}],
sbeEnabled ? {
LIMIT: {path: "limitAmount", expectedValue: [1]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong(1)]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
},
sbeFullyEnabled
? {
LIMIT: {path: "limitAmount", expectedValue: [1]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong(1)]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
},
["$skip"]);
testPipeline(
[{$sort: {x: -1}}, {$skip: 1}, {$limit: NumberLong("9223372036854775807")}],
sbeEnabled ? {
LIMIT: {path: "limitAmount", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [1]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [1]}
},
sbeFullyEnabled
? {
LIMIT: {path: "limitAmount", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [1]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [1]}
},
["$skip"]);
// Case where limit + skip do not overflow. Limit == MAX_LONG and skip is 0. Should be able to
@ -119,7 +121,7 @@ testPipeline(
{$skip: 10},
{$limit: 1}
],
sbeEnabled
sbeFullyEnabled
? {
SORT: {path: "limitAmount", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [10, NumberLong("9223372036854775800")]},
@ -166,29 +168,31 @@ testPipeline([{$sort: {x: -1}}, {$skip: 35361718}, {$limit: 674761616283}],
// One skip == MAX_LONG - 1, another one is 1. Should merge two skip stages into one and push down.
testPipeline(
[{$sort: {x: -1}}, {$skip: 1}, {$skip: NumberLong("9223372036854775806")}, {$limit: 1}],
sbeEnabled ? {
LIMIT: {path: "limitAmount", expectedValue: [1]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong(1)]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
},
sbeFullyEnabled
? {
LIMIT: {path: "limitAmount", expectedValue: [1]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong(1)]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
},
["$skip", "$sort"]);
// Case where where overflow of limit + skip + skip prevents limit stage and one of the skip stages
// from being absorbed. One skip == MAX_LONG, another one is 1. Should absorb the first skip.
testPipeline(
[{$sort: {x: -1}}, {$skip: 1}, {$skip: NumberLong("9223372036854775807")}, {$limit: 1}],
(sbeEnabled ? {
LIMIT: {path: "limitAmount", expectedValue: [1]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807"), 1]},
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong(1)]},
SKIP: {path: "skipAmount", expectedValue: [1]},
$skip: {path: "$skip", expectedValue: [NumberLong("9223372036854775807")]}
}),
(sbeFullyEnabled
? {
LIMIT: {path: "limitAmount", expectedValue: [1]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807"), 1]},
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong(1)]},
SKIP: {path: "skipAmount", expectedValue: [1]},
$skip: {path: "$skip", expectedValue: [NumberLong("9223372036854775807")]}
}),
["$sort"]);
// Cases where both limit and skip == MAX_LONG.
@ -210,14 +214,15 @@ testPipeline(
{$skip: NumberLong("9223372036854775807")},
{$limit: NumberLong("9223372036854775807")}
],
sbeEnabled ? {
LIMIT: {path: "limitAmount", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
},
sbeFullyEnabled
? {
LIMIT: {path: "limitAmount", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
}
: {
$limit: {path: "$limit", expectedValue: [NumberLong("9223372036854775807")]},
SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807")]}
},
["$skip", "$sort"]);
// Case where sample size is > MAX_LONG.
@ -241,7 +246,7 @@ testPipeline(
{$skip: NumberLong("3")},
{$skip: NumberLong("4")},
],
sbeEnabled
sbeFullyEnabled
? {SKIP: {path: "skipAmount", expectedValue: [NumberLong("9223372036854775807"), 10]}}
: {
$skip: {path: "$skip", expectedValue: [NumberLong("9223372036854775807")]},

View File

@ -9,20 +9,20 @@
// assumes_no_implicit_index_creation,
// ]
import {getAggPlanStages} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
let coll = db.explain_limit;
const kCollSize = 105;
const kLimit = 10;
const isSBEEnabled = checkSBEEnabled(db);
const isSbeFullyEnabled = checkSbeFullyEnabled(db);
// Return whether or explain() was successful and contained the appropriate fields given the
// requested verbosity. Checks that the number of documents examined and returned are correct given
// the value of the limit.
function checkResults({results, verbosity}) {
const [cursorSubdocs, limitAmount] = (() => {
if (verbosity != "queryPlanner" && isSBEEnabled) {
if (verbosity != "queryPlanner" && isSbeFullyEnabled) {
// We cannot use the "executionStats" section for SBE plans without some pre-processing,
// since it has different explain format. To find execution stats for the LIMIT stages
// from the "queryPlanner" section (there could be multiple of such stages if we're in a

View File

@ -14,7 +14,7 @@
import "jstests/libs/sbe_assert_error_override.js";
import {assertArrayEq} from "jstests/aggregation/extras/utils.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.projection_expr_concat_arrays;
coll.drop();
@ -133,7 +133,7 @@ runAndAssertThrows(["$dbl_arr", "$dbl_val"]);
// Confirm edge case where if invalid input precedes null or missing inputs, the command fails.
// Note that when the SBE engine is enabled, null will be returned before invalid input because
// we check if any values are null before checking whether all values are arrays.
let evalFn = checkSBEEnabled(db) ? runAndAssertNull : runAndAssertThrows;
let evalFn = checkSbeFullyEnabled(db) ? runAndAssertNull : runAndAssertThrows;
evalFn(["$int_arr", "$dbl_val", "$null_val"]);
evalFn(["$int_arr", "some_string_value", "$null_val"]);
evalFn(["$dbl_val", "$null_val"]);

View File

@ -0,0 +1,195 @@
// Tests the behavior of $_internalKeyStringValue when used in agg expressions.
const coll = db[jsTestName()];
// Testing behavior for basic data types.
coll.drop();
let docs = [
{_id: 0, a: NumberInt(1)},
{_id: 1, a: NumberLong(2)},
{_id: 2, a: 3.0},
{_id: 3, a: NumberDecimal("4.000000")},
{_id: 4, a: "abc"},
{_id: 5, a: ISODate("2024-01-01")},
{_id: 6, a: [1, 2, 3]},
{_id: 7, a: {b: 1, c: 2, d: 3}},
];
assert.commandWorked(coll.insert(docs));
let results =
coll.aggregate(
[{$sort: {_id: 1}}, {$addFields: {b: {$_internalKeyStringValue: {input: "$a"}}}}])
.toArray();
assert.eq(results,
[
{_id: 0, a: NumberInt(1), b: BinData(0, "KwIE")},
{_id: 1, a: NumberLong(2), b: BinData(0, "KwQE")},
{_id: 2, a: 3.0, b: BinData(0, "KwYE")},
{_id: 3, a: NumberDecimal("4.000000"), b: BinData(0, "KwgE")},
{_id: 4, a: "abc", b: BinData(0, "PGFiYwAE")},
{_id: 5, a: ISODate("2024-01-01"), b: BinData(0, "eIAAAYzCUfQABA==")},
{_id: 6, a: [1, 2, 3], b: BinData(0, "UCsCKwQrBgAE")},
{_id: 7, a: {b: 1, c: 2, d: 3}, b: BinData(0, "Rh5iACsCHmMAKwQeZAArBgAE")},
],
results);
// Testing behavior for same numeric values of different types.
assert(coll.drop());
docs = [
{_id: 0, a: NumberInt(1)},
{_id: 1, a: NumberLong(1)},
{_id: 2, a: 1.0},
{_id: 3, a: NumberDecimal("1.000")},
{_id: 4, a: NumberDecimal("1.000000")},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate(
[{$sort: {_id: 1}}, {$addFields: {b: {$_internalKeyStringValue: {input: "$a"}}}}])
.toArray();
assert.eq(docs.length, results.length, results);
assert(results.every(result => bsonWoCompare(result.b, results[0].b) === 0), results);
// Testing behavior for same numeric values of different types inside object.
assert(coll.drop());
docs = [
{_id: 0, a: {b: NumberInt(1)}},
{_id: 1, a: {b: 1.0}},
{_id: 2, a: {b: NumberDecimal("1.000")}},
{_id: 3, a: {b: NumberDecimal("1.000000")}},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate(
[{$sort: {_id: 1}}, {$addFields: {c: {$_internalKeyStringValue: {input: "$a"}}}}])
.toArray();
assert.eq(docs.length, results.length, results);
assert(results.every(result => bsonWoCompare(result.c, results[0].c) === 0), results);
// Testing behavior for close numeric values.
assert(coll.drop());
docs = [
{_id: 0, a: 1},
{_id: 1, a: 1.00001},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate(
[{$sort: {_id: 1}}, {$addFields: {b: {$_internalKeyStringValue: {input: "$a"}}}}])
.toArray();
assert.eq(2, results.length, results);
assert(bsonWoCompare(results[0].b, results[1].b) !== 0, results);
// Testing behavior for large numeric values.
assert(coll.drop());
docs = [
{_id: 0, a: 1e20},
{_id: 1, a: NumberDecimal("1e21")},
];
assert.commandWorked(coll.insert(docs));
results =
coll.aggregate([
{$sort: {_id: 1}},
{
$addFields:
{b: {$_internalKeyStringValue: {input: "$a"}}, c: {$toHashedIndexKey: "$a"}}
}
])
.toArray();
assert.eq(2, results.length, results);
assert(bsonWoCompare(results[0].b, results[1].b) !== 0, results);
// $toHashedIndexKey hashes large numbers greater than 2^63 to the same result.
assert(bsonWoCompare(results[0].c, results[1].c) === 0, results);
// Testing behavior for strings under case-sensitive collation that doesn't match.
assert(coll.drop());
docs = [
{_id: 0, a: "aAa"},
{_id: 1, a: "AaA"},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate([
{$sort: {_id: 1}},
{
$addFields: {
b: {
$_internalKeyStringValue:
{input: "$a", collation: {locale: "en", strength: 3}}
}
}
}
])
.toArray();
assert.eq(2, results.length, results);
assert(bsonWoCompare(results[0].b, results[1].b) !== 0, results);
// Testing behavior for strings under case-sensitive collation that matches.
assert(coll.drop());
docs = [
{_id: 0, a: "aAa"},
{_id: 1, a: "aAa"},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate([
{$sort: {_id: 1}},
{
$addFields: {
b: {
$_internalKeyStringValue:
{input: "$a", collation: {locale: "en", strength: 3}}
}
}
}
])
.toArray();
assert.eq(docs.length, results.length, results);
assert(results.every(result => bsonWoCompare(result.c, results[0].c) === 0), results);
// Testing behavior for strings under case-insensitive collation that doesn't match.
assert(coll.drop());
docs = [
{_id: 0, a: "aAa"},
{_id: 1, a: "aBa"},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate([
{$sort: {_id: 1}},
{
$addFields: {
b: {
$_internalKeyStringValue:
{input: "$a", collation: {locale: "en", strength: 1}}
}
}
}
])
.toArray();
assert.eq(2, results.length, results);
assert(bsonWoCompare(results[0].b, results[1].b) !== 0, results);
// Testing behavior for strings under case-insensitive collation that matches.
assert(coll.drop());
docs = [
{_id: 0, a: "aAa"},
{_id: 1, a: "AaA"},
];
assert.commandWorked(coll.insert(docs));
results = coll.aggregate([
{$sort: {_id: 1}},
{
$addFields: {
b: {
$_internalKeyStringValue:
{input: "$a", collation: {locale: "en", strength: 1}}
}
}
}
])
.toArray();
assert.eq(docs.length, results.length, results);
assert(results.every(result => bsonWoCompare(result.b, results[0].b) === 0), results);

View File

@ -25,9 +25,10 @@ import {
planHasStage,
} from "jstests/libs/analyze_plan.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled, checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
const sbeEnabled = checkSBEEnabled(db);
const sbeFullyEnabled = checkSbeFullyEnabled(db);
const sbeRestricted = checkSbeRestrictedOrFullyEnabled(db);
const coll = db.optimize_away_pipeline;
coll.drop();
@ -144,10 +145,14 @@ function testGetMore({command = null, expectedResult = null} = {}) {
assert.sameMembers(documents, expectedResult);
}
// Calls 'assertPushdownEnabled' if sbeEnabled is 'true'. Otherwise, it calls
// Calls 'assertPushdownEnabled' if sbeFullyEnabled is 'true' or if pipeline has SBE eligible stages
// ($group, $lookup, $_internalUnpackBucket, and $search) under sbeRestricted. Otherwise, it calls
// 'assertPushdownDisabled'.
function assertPipelineIfSbeEnabled(assertPushdownEnabled, assertPushdownDisabled) {
return sbeEnabled ? assertPushdownEnabled() : assertPushdownDisabled();
function assertPipelineIfSbeEnabled(
assertPushdownEnabled, assertPushdownDisabled, hasEligibleRestrictedStage = false) {
return sbeFullyEnabled || (sbeRestricted && hasEligibleRestrictedStage)
? assertPushdownEnabled()
: assertPushdownDisabled();
}
// Basic pipelines.
@ -284,7 +289,8 @@ assertPipelineIfSbeEnabled(
expectedStages: ["COLLSCAN", "PROJECTION_SIMPLE"],
expectedResult: [{_id: "null", s: 50}],
});
});
},
true /* hasEligibleRestrictedStage */);
// Test that we can optimize away a pipeline with a $text search predicate.
assert.commandWorked(coll.createIndex({y: "text"}));
@ -435,7 +441,8 @@ assertPipelineIfSbeEnabled(
expectedResult: [{_id: null, s: 30}],
optimizedAwayStages: ["$sort", "$limit"],
});
});
},
true /* hasEligibleRestrictedStage */);
// Test that $limit can be pushed down before a group, but it prohibits the DISTINCT_SCAN
// optimization.
@ -465,7 +472,8 @@ assertPipelineIfSbeEnabled(
expectedStages: ["COLLSCAN", "LIMIT"],
optimizedAwayStages: ["$limit"],
});
});
},
true /* hasEligibleRestrictedStage */);
pipeline = [{$sort: {x: 1}}, {$limit: 2}, {$group: {_id: "$x"}}];
assertPipelineIfSbeEnabled(
@ -481,7 +489,8 @@ assertPipelineIfSbeEnabled(
expectedStages: ["IXSCAN", "PROJECTION_COVERED", "LIMIT"],
optimizedAwayStages: ["$sort", "$limit"],
});
});
},
true /* hasEligibleRestrictedStage */);
// $limit after a group has no effect on our ability to produce a DISTINCT_SCAN plan.
assertPipelineUsesAggregation({
@ -581,7 +590,8 @@ assertPipelineIfSbeEnabled(
pipeline: pipeline,
expectedStages: ["COLLSCAN", "PROJECTION_SIMPLE"],
});
});
},
true /* hasEligibleRestrictedStage */);
pipeline = [{$group: {_id: "$a", b: {$sum: "$b"}}}, {$group: {_id: "$c", x: {$sum: "$b"}}}];
assertPipelineIfSbeEnabled(
function() {
@ -598,7 +608,8 @@ assertPipelineIfSbeEnabled(
pipeline: pipeline,
expectedStages: ["COLLSCAN", "PROJECTION_SIMPLE"],
});
});
},
true /* hasEligibleRestrictedStage */);
function assertTransformByShape(expected, actual, message) {
assert.eq(Object.keys(expected).sort(), Object.keys(actual).sort(), message);
@ -622,7 +633,8 @@ assertPipelineIfSbeEnabled(
let projStage = getAggPlanStage(explain, "PROJECTION_SIMPLE");
assert.neq(null, projStage, explain);
assertTransformByShape({a: 1, b: 1, _id: 0}, projStage.transformBy, explain);
});
},
true /* hasEligibleRestrictedStage */);
// Similar as above, but with $addFields stage at the front of the pipeline.
pipeline = [{$addFields: {z: "abc"}}, {$group: {_id: "$a", b: {$sum: "$b"}}}];
@ -660,7 +672,8 @@ function assertProjectionCanBeRemovedBeforeGroup(pipeline, projectionType = "PRO
pipeline: pipeline,
expectedStages: ["COLLSCAN", projectionType, "$group"],
});
});
},
true /* hasEligibleRestrictedStage */);
}
// Asserts that a projection stage is not optimized out of a pipeline with a projection and a group
@ -679,7 +692,8 @@ function assertProjectionIsNotRemoved(pipeline, projectionType = "PROJECTION_SIM
pipeline: pipeline,
expectedStages: ["COLLSCAN", projectionType, "$group"],
});
});
},
true /* hasEligibleRestrictedStage */);
}
// Test that an inclusion projection is optimized away if it is redundant/unnecessary.
@ -741,7 +755,8 @@ assertPipelineIfSbeEnabled(
pipeline: pipeline,
expectedStages: ["COLLSCAN", "PROJECTION_DEFAULT", "$group"],
});
});
},
true /* hasEligibleRestrictedStage */);
// We generate a projection stage from dependency analysis, even if the pipeline begins with an
// exclusion projection.

View File

@ -11,7 +11,6 @@
*/
import {checkCascadesOptimizerEnabled} from "jstests/libs/optimizer_utils.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
(function() {
"use strict";
@ -27,7 +26,6 @@ if (debugBuild || !_optimizationsEnabled() || _isAddressSanitizerActive() ||
}
const isBonsaiEnabled = checkCascadesOptimizerEnabled(db);
const isSBEEnabled = checkSBEEnabled(db);
const coll = db.query_limits_test;
coll.drop();

View File

@ -8,6 +8,8 @@
// assumes_read_concern_unchanged,
// assumes_against_mongod_not_mongos,
// does_not_support_repeated_reads,
// # oplog queries could affect the statistics
// assumes_standalone_mongod
// ]
const testDB = db.getSiblingDB("facet_stats");
@ -50,4 +52,4 @@ curScannedKeys = queryExecutor.scanned - curScannedKeys;
// cardinality(local) + cardinality(local) * cardinality(foreign) = 3 + 3 * 3 = 12.
assert.eq(12, curScannedObjects);
// $facet sub-pipelines cannot make use of indexes. Hence scanned keys should be 0.
assert.eq(0, curScannedKeys);
assert.eq(0, curScannedKeys);

View File

@ -1,16 +1,12 @@
/**
* Tests for $lookup with localField/foreignField syntax using hash join algorithm.
*
* @tags: [featureFlagSbeFull]
*/
import {
JoinAlgorithm,
runTests
} from "jstests/aggregation/sources/lookup/lookup_equijoin_semantics_lib.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
if (!checkSBEEnabled(db)) {
jsTestLog("Skipping the test because it only applies to $lookup in SBE");
quit();
}
runTests({
localColl: db.lookup_arrays_semantics_local_hj,

View File

@ -16,7 +16,7 @@
import {assertArrayEq} from "jstests/aggregation/extras/utils.js";
import {getAggPlanStages} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
export const JoinAlgorithm = {
HJ: {name: "HJ", strategy: "HashJoin"},
@ -47,7 +47,7 @@ export function setupCollections(testConfig, localRecords, foreignRecords, forei
export function checkJoinConfiguration(testConfig, explain) {
const {currentJoinAlgorithm} = testConfig;
const eqLookupNodes = getAggPlanStages(explain, "EQ_LOOKUP");
if (checkSBEEnabled(db)) {
if (checkSbeRestrictedOrFullyEnabled(db)) {
if (eqLookupNodes.length > 0) {
// The $lookup stage has been lowered. Check that it's using the expected join strategy.
assert.eq(currentJoinAlgorithm.strategy, eqLookupNodes[0].strategy, "Join strategy");
@ -264,7 +264,9 @@ export function runTests(testConfig) {
{_id: 11, a: [[null, 1], 2]},
];
if (checkSBEEnabled(db)) {
// $lookup is allowed to run with sbe when internalQueryFrameworkControl is set to
// 'trySbeRestricted'.
if (checkSbeRestrictedOrFullyEnabled(db)) {
// When lowered to SBE, "undefined" should only match "undefined".
runTest_SingleForeignRecord(testConfig, {
testDescription: "Undefined in foreign, top-level field in local",

View File

@ -19,9 +19,9 @@ import {
getQueryInfoAtTopLevelOrFirstStage,
getSbePlanStages
} from "jstests/libs/sbe_explain_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
const isSBELookupEnabled = checkSBEEnabled(db);
const isSBELookupEnabled = checkSbeRestrictedOrFullyEnabled(db);
const testDB = db.getSiblingDB("lookup_query_stats");
testDB.dropDatabase();

View File

@ -143,4 +143,4 @@ assertAggregateCommandFailed([{$limit: -1}], 5107201);
assert.eq(coll.aggregate([{$skip: 0}]).itcount(), 20);
// Verifies that command fails executing when $limit argument is zero.
assertAggregateCommandFailed([{$limit: 0}], 15958);
assertAggregateCommandFailed([{$limit: 0}], 15958);

View File

@ -4,14 +4,18 @@
// do_not_wrap_aggregations_in_facets,
// requires_pipeline_optimization,
// ]
import {orderedArrayEq} from "jstests/aggregation/extras/utils.js";
import {documentEq, orderedArrayEq} from "jstests/aggregation/extras/utils.js";
import {
getPlanStages,
getWinningPlan,
isAggregationPlan,
isQueryPlan,
planHasStage
isQueryPlan
} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {
checkSbeCompletelyDisabled,
checkSbeFullyEnabled,
checkSbeRestrictedOrFullyEnabled
} from "jstests/libs/sbe_util.js";
let coll = db.remove_redundant_projects;
coll.drop();
@ -20,17 +24,20 @@ assert.commandWorked(coll.insert({_id: {a: 1, b: 1}, a: 1, c: {d: 1}, e: ['elem1
let indexSpec = {a: 1, 'c.d': 1, 'e.0': 1};
const sbeEnabled = checkSBEEnabled(db);
const sbeFullyEnabled = checkSbeFullyEnabled(db);
const sbeRestricted = checkSbeRestrictedOrFullyEnabled(db);
/**
* Helper to test that for a given pipeline, the same results are returned whether or not an
* index is present. Also tests whether a projection is absorbed by the pipeline
* ('expectProjectToCoalesce') and the corresponding project stage ('removedProjectStage') does
* not exist in the explain output.
* not exist in the explain output. When 'expectProjectToCoalesce' is true, the caller should
* specify which projects are expected to coalesce in 'expectedCoalescedProjects'.
*/
function assertResultsMatch({
pipeline = [],
expectProjectToCoalesce = false,
expectedCoalescedProjects = [],
removedProjectStage = null,
index = indexSpec,
pipelineOptimizedAway = false
@ -55,13 +62,34 @@ function assertResultsMatch({
assert(isAggregationPlan(explain), explain);
result = getWinningPlan(explain.stages[0].$cursor.queryPlanner);
}
// Check that $project uses the query system and all expectedCoalescedProjects are
// actually present in explain.
if (expectProjectToCoalesce) {
assert.gte(
expectedCoalescedProjects.length,
1,
"If we expect project to coalesce, there should be at least one such projection in expectedCoalescedProjects " +
tojson(expectedCoalescedProjects));
// Check that $project uses the query system.
assert.eq(expectProjectToCoalesce,
planHasStage(db, result, "PROJECTION_DEFAULT") ||
planHasStage(db, result, "PROJECTION_COVERED") ||
planHasStage(db, result, "PROJECTION_SIMPLE"),
explain);
const projects = [
...getPlanStages(result, "PROJECTION_DEFAULT"),
...getPlanStages(result, "PROJECTION_COVERED"),
...getPlanStages(result, "PROJECTION_SIMPLE")
];
assert.gte(projects.length, 1, explain);
const areAllexpectedCoalescedProjectsPresent =
expectedCoalescedProjects.every(coalescedProject => {
return projects.some(project => {
return documentEq(project.transformBy, coalescedProject);
});
});
assert(areAllexpectedCoalescedProjectsPresent,
"There were missing or extra coalesced projects in " +
tojson(expectedCoalescedProjects) + " with explain " + tojson(explain));
}
if (!pipelineOptimizedAway) {
// Check that $project was removed from pipeline and pushed to the query system.
@ -84,17 +112,20 @@ function assertResultsMatch({
assertResultsMatch({
pipeline: [{$project: {_id: 0, a: 1}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"a": true, "_id": false}],
pipelineOptimizedAway: true
});
assertResultsMatch({
pipeline: [{$project: {_id: 0, a: 1}}, {$group: {_id: null, a: {$sum: "$a"}}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"a": true, "_id": false}],
removedProjectStage: {_id: 0, a: 1},
pipelineOptimizedAway: sbeEnabled
pipelineOptimizedAway: sbeRestricted
});
assertResultsMatch({
pipeline: [{$sort: {a: -1}}, {$project: {_id: 0, a: 1}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"a": true, "_id": false}],
pipelineOptimizedAway: true
});
assertResultsMatch({
@ -104,12 +135,14 @@ assertResultsMatch({
{$group: {_id: "$a", a: {$sum: "$a"}}}
],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"a": true, "_id": false}],
removedProjectStage: {_id: 0, a: 1},
pipelineOptimizedAway: sbeEnabled
pipelineOptimizedAway: sbeRestricted
});
assertResultsMatch({
pipeline: [{$project: {_id: 0, c: {d: 1}}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"c": {"d": true}, "_id": false}],
pipelineOptimizedAway: true
});
@ -117,11 +150,13 @@ assertResultsMatch({
assertResultsMatch({
pipeline: [{$project: {_id: 0, f: "$a"}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"f": "$a", "_id": false}],
pipelineOptimizedAway: true
});
assertResultsMatch({
pipeline: [{$project: {_id: 0, a: 1, f: "$a"}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"a": true, "f": "$a", "_id": false}],
pipelineOptimizedAway: true
});
@ -129,29 +164,44 @@ assertResultsMatch({
assertResultsMatch({
pipeline: [{$sort: {a: 1}}, {$project: {_id: 1, b: 1}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"_id": true, "b": true}],
pipelineOptimizedAway: true
});
// When SBE is not enabled, we end up pushing down a projection which is internally generated by the
// aggregation subsystem's dependency analysis logic.
assertResultsMatch({
pipeline: [{$sort: {a: 1}}, {$group: {_id: "$_id", a: {$sum: "$a"}}}, {$project: {arr: 1}}],
expectProjectToCoalesce: true,
pipelineOptimizedAway: sbeEnabled
expectProjectToCoalesce: checkSbeCompletelyDisabled(db) || sbeFullyEnabled,
expectedCoalescedProjects: sbeFullyEnabled ? [{"_id": true, "arr": true}]
: [{"_id": 1, "a": 1}],
pipelineOptimizedAway: sbeFullyEnabled
});
// Test that projections with computed fields are removed from the pipeline.
assertResultsMatch({
pipeline: [{$project: {computedField: {$sum: "$a"}}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"_id": true, "computedField": {"$sum": ["$a"]}}],
pipelineOptimizedAway: true
});
assertResultsMatch({
pipeline: [{$project: {a: ["$a", "$b"]}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"_id": true, "a": ["$a", "$b"]}],
pipelineOptimizedAway: true
});
assertResultsMatch({
pipeline:
[{$project: {e: {$filter: {input: "$e", as: "item", cond: {"$eq": ["$$item", "elem0"]}}}}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{
"_id": true,
"e": {
"$filter":
{"input": "$e", "as": "item", "cond": {"$eq": ["$$item", {"$const": "elem0"}]}}
}
}],
pipelineOptimizedAway: true
});
@ -162,7 +212,9 @@ assertResultsMatch({
{$project: {_id: 0}}
],
expectProjectToCoalesce: true,
pipelineOptimizedAway: sbeEnabled
expectedCoalescedProjects: sbeFullyEnabled ? [{"a": true, "_id": false}, {"_id": false}]
: [{"a": true, "_id": false}],
pipelineOptimizedAway: sbeFullyEnabled
});
// Test that projections on _id with nested fields are removed from pipeline.
@ -173,6 +225,7 @@ indexSpec = {
assertResultsMatch({
pipeline: [{$match: {"_id.a": 1}}, {$project: {'_id.a': 1}}],
expectProjectToCoalesce: true,
expectedCoalescedProjects: [{"_id": {"a": true}}],
index: indexSpec,
pipelineOptimizedAway: true,
removedProjectStage: {'_id.a': 1},

View File

@ -6,8 +6,6 @@ import {
testAccumAgainstGroup
} from "jstests/aggregation/extras/window_function_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const coll = db[jsTestName()];
coll.drop();

View File

@ -6,8 +6,6 @@ import {
testAccumAgainstGroup
} from "jstests/aggregation/extras/window_function_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const coll = db[jsTestName()];
coll.drop();

View File

@ -19,7 +19,6 @@ import {getAggPlanStages} from "jstests/libs/analyze_plan.js";
import {DiscoverTopology} from "jstests/libs/discover_topology.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {getLatestProfilerEntry} from "jstests/libs/profiler.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {setParameterOnAllHosts} from "jstests/noPassthrough/libs/server_parameter_helpers.js";
// Doc size was found through logging the size in the SpillableCache. Partition sizes were chosen
@ -214,18 +213,24 @@ function testUsedDiskAppearsInExplain() {
{$sort: {_id: 1}}
];
const stageName =
checkSBEEnabled(db, ["featureFlagSbeFull"]) ? "window" : "$_internalSetWindowFields";
let stages = getAggPlanStages(
coll.explain("allPlansExecution").aggregate(explainPipeline, {allowDiskUse: true}),
stageName);
let explainAllPlansExecution =
coll.explain("allPlansExecution").aggregate(explainPipeline, {allowDiskUse: true});
// If setWindowFields is pushed down to SBE, the stage name in explain will be 'window',
// otherwise it will be '$_internalSetWindowFields'.
let stages =
getAggPlanStages(explainAllPlansExecution, "window")
.concat(getAggPlanStages(explainAllPlansExecution, "$_internalSetWindowFields"));
assert.gt(stages.length, 0, stages);
assert(stages[0]["usedDisk"], stages);
// Run an explain query with the default memory limit, so 'usedDisk' should be false.
changeSpillLimit({mode: 'off', maxDocs: null});
stages = getAggPlanStages(
coll.explain("allPlansExecution").aggregate(explainPipeline, {allowDiskUse: true}),
stageName);
explainAllPlansExecution =
coll.explain("allPlansExecution").aggregate(explainPipeline, {allowDiskUse: true});
stages = getAggPlanStages(explainAllPlansExecution, "window")
.concat(getAggPlanStages(explainAllPlansExecution, "$_internalSetWindowFields"));
assert.gt(stages.length, 0, stages);
assert(!stages[0]["usedDisk"], stages);
}

View File

@ -6,7 +6,6 @@ import {
seedWithTickerData,
testAccumAgainstGroup
} from "jstests/aggregation/extras/window_function_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const coll = db[jsTestName()];
coll.drop();

View File

@ -1,5 +1,9 @@
/**
* Test $_internalShredDocuments parsing and make sure it doesn't modify documents.
* this test assumes {$meta: "indexKey"} will not be missing.
* @tags: [
* do_not_wrap_aggregations_in_facets
* ]
*/
"use strict";
@ -7,7 +11,8 @@ import {assertArrayEq} from "jstests/aggregation/extras/utils.js";
const coll = db[jsTestName()];
coll.insertMany(
[{a: 1, obj: {a: 1}, arr: [{a: 1}]}, {a: 1, obj: {a: 1}, arr: [{a: 1}]}, {}, {a: 1}]);
[{a: 1, obj: {a: 1}, arr: [{a: 1}]}, {a: 2, obj: {a: 1}, arr: [{a: 1}]}, {}, {a: 3}]);
coll.createIndex({a: 1});
assert.commandFailedWithCode(assert.throws(() => coll.aggregate({$_internalShredDocuments: 1})),
7997500);
assert.commandFailedWithCode(
@ -40,3 +45,17 @@ assertNoop(matchExcludeGroup, 0);
assertNoop(matchExcludeGroup, 1);
assertNoop(matchExcludeGroup, 2);
assertNoop(matchExcludeGroup, 3);
assertNoop([{$match: {a: 1}}, {$addFields: {key: {$meta: "indexKey"}}}], 1);
// The shred() function is also used by set windowFields so lets test that too.
const res = coll.aggregate([
{$match: {a: 1}},
{$addFields: {key: {$meta: "indexKey"}}},
{$setWindowFields: {sortBy: {a: 1}, output: {w: {$rank: {}}}}},
{$limit: 1}
])
.toArray();
assert.eq(1, res.length);
assert(res[0].hasOwnProperty("key"));
assert.eq({a: 1}, res[0]["key"]);

View File

@ -18,7 +18,7 @@ import "jstests/libs/sbe_assert_error_override.js";
import {arrayEq, assertArrayEq} from "jstests/aggregation/extras/utils.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {getSbePlanStages} from "jstests/libs/sbe_explain_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.spill_to_disk;
coll.drop();
@ -53,7 +53,7 @@ const sharded = FixtureHelpers.isSharded(coll);
const memoryLimitMB = sharded ? 200 : 100;
const isSbeEnabled = checkSBEEnabled(db);
const isSbeGroupLookupPushdownEnabled = checkSbeRestrictedOrFullyEnabled(db);
const bigStr = Array(1024 * 1024 + 1).toString(); // 1MB of ','
for (let i = 0; i < memoryLimitMB + 1; i++)
@ -76,7 +76,7 @@ function test({pipeline, expectedCodes, canSpillToDisk}) {
assert.eq(new DBCommandCursor(coll.getDB(), res).itcount(),
coll.count()); // all tests output one doc per input doc
if (isSbeEnabled) {
if (isSbeGroupLookupPushdownEnabled) {
const explain = db.runCommand({
explain:
{aggregate: coll.getName(), pipeline: pipeline, cursor: {}, allowDiskUse: true}
@ -270,7 +270,7 @@ function testAccumulator({accumulator, sortInputBy, expectedOutput, ignoreArrayO
assert.eq(results, expectedOutput);
}
if (isSbeEnabled) {
if (isSbeGroupLookupPushdownEnabled) {
const explain = coll.explain("executionStats").aggregate(pipeline);
const groupStages = getSbePlanStages(explain, "group");
assert.eq(groupStages.length, 1, groupStages);
@ -444,7 +444,7 @@ function runTest_MultipleLocalForeignRecords({
const results = localColl.aggregate(pipeline, {allowDiskUse: true}).toArray();
const explain = localColl.explain('executionStats').aggregate(pipeline, {allowDiskUse: true});
// If sharding is enabled, '$lookup' is not pushed down to SBE.
if (isSbeEnabled && !sharded) {
if (isSbeGroupLookupPushdownEnabled && !sharded) {
const hLookups = getSbePlanStages(explain, 'hash_lookup');
assert.eq(hLookups.length, 1, explain);
const hLookup = hLookups[0];

View File

@ -463,6 +463,9 @@ export const authCommandsLib = {
testname: 'transitionFromDedicatedConfigServer',
command: {transitionFromDedicatedConfigServer: 1},
skipUnlessSharded: true,
skipTest: (conn) => {
return !TestData.setParameters.featureFlagTransitionToCatalogShard;
},
testcases: [
{
runOnDb: adminDbName,
@ -477,6 +480,9 @@ export const authCommandsLib = {
testname: "_configsvrTransitionFromDedicatedConfigServer",
command: {_configsvrTransitionFromDedicatedConfigServer: 1},
skipSharded: true,
skipTest: (conn) => {
return !TestData.setParameters.featureFlagTransitionToCatalogShard;
},
testcases: [
{
runOnDb: adminDbName,
@ -492,6 +498,9 @@ export const authCommandsLib = {
testname: "transitionToDedicatedConfigServer",
command: { transitionToDedicatedConfigServer: 1 },
skipUnlessSharded: true,
skipTest: (conn) => {
return !TestData.setParameters.featureFlagTransitionToCatalogShard;
},
testcases: [
{
runOnDb: adminDbName,
@ -507,6 +516,9 @@ export const authCommandsLib = {
testname: "_configsvrTransitionToDedicatedConfigServer",
command: {_configsvrTransitionToDedicatedConfigServer: 1},
skipSharded: true,
skipTest: (conn) => {
return !TestData.setParameters.featureFlagTransitionToCatalogShard;
},
testcases: [
{
runOnDb: adminDbName,

View File

@ -6,13 +6,13 @@
* assumes_standalone_mongod,
* ]
*/
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const mongod = MongoRunner.runMongod();
const dbName = "test";
const db = mongod.getDB(dbName);
const sbeEnabled = checkSBEEnabled(db);
const sbeEnabled = checkSbeFullyEnabled(db);
// Create two users, each with different roles.
assert.commandWorked(

View File

@ -1,7 +1,6 @@
/**
* Test that change streams returns shardCollection events with the options specified on the
* original user command.
* TODO SERVER-81138 remove multiversion_incompatible and fix comparison with 7.0 binaries
* @tags: [
* requires_fcv_60,
* requires_sharding,
@ -9,7 +8,6 @@
* change_stream_does_not_expect_txns,
* assumes_unsharded_collection,
* assumes_read_preference_unchanged,
* multiversion_incompatible,
* ]
*/
@ -42,6 +40,19 @@ function getCollectionUuid(coll) {
return collInfo.info.uuid;
}
function assertChangeStreamEventEqMultiversionCompatible(actualEvent, expectedEvent) {
// SERVER-83104: Remove 'numInitialChunks' check once 8.0 becomes last LTS.
if ('numInitialChunks' in actualEvent.operationDescription) {
delete actualEvent.operationDescription.numInitialChunks;
}
// SERVER-83104: Remove 'capped' check once 8.0 becomes last LTS.
if (!('capped' in actualEvent.operationDescription)) {
delete expectedEvent.operationDescription.capped;
}
return assertChangeStreamEventEq(actualEvent, expectedEvent);
}
function assertNextChangeEvent(cursor, expectedEvent) {
let events = test.getNextChanges(cursor, 1);
while (events.length > 0) {
@ -60,7 +71,7 @@ function assertNextChangeEvent(cursor, expectedEvent) {
assert(event.wallTime instanceof Date);
delete event.wallTime;
expectedEvent.collectionUUID = getCollectionUuid(collName);
assertChangeStreamEventEq(event, expectedEvent);
assertChangeStreamEventEqMultiversionCompatible(event, expectedEvent);
}
function runTest(startChangeStream) {
@ -92,7 +103,7 @@ function runTest(startChangeStream) {
}
const shardEvent = events[0];
assertChangeStreamEventEq(shardEvent, expectedOutput);
assertChangeStreamEventEqMultiversionCompatible(shardEvent, expectedOutput);
// Insert a document before starting the next change stream so that we can validate the
// resuming behavior.
@ -181,16 +192,7 @@ function runTest(startChangeStream) {
"unique": false,
"presplitHashedZones": false,
"capped": false,
"collation": {
"locale": "simple",
"caseLevel": false,
"caseFirst": "off",
"strength": 3,
"numericOrdering": false,
"alternate": "non-ignorable",
"maxVariable": "punct",
"normalization": false
}
"collation": {"locale": "simple"}
}
})
}

View File

@ -10,7 +10,7 @@
* requires_fcv_61,
* ]
*/
import {getPlanStage, getPlanStages} from "jstests/libs/analyze_plan.js";
import {checkNWouldDelete, getPlanStage, getPlanStages} from "jstests/libs/analyze_plan.js";
export const $config = (function() {
// 'data' is passed (copied) to each of the worker threads.
@ -43,10 +43,18 @@ export const $config = (function() {
if (clusterTopology === '') {
assert(getPlanStage(expl, "BATCHED_DELETE"), tojson(expl));
} else {
// Normally, we target both shards; however, in rare cases when the balancer is
// running, we may only target a single shard if during the last refresh, a shard no
// longer owns a chunk it used to, which makes targeting more specific.
const shardNames = Object.keys(clusterTopology.shards);
const stages = getPlanStages(expl, "BATCHED_DELETE");
assert.eq(stages.length, shardNames.length, tojson(expl));
assert.gte(stages.length, 1, tojson(expl));
assert.lte(stages.length, shardNames.length, tojson(expl));
}
// Verify we wouldn't delete anything, since no ObjectId() would match the
// predicate {$gte: 0}.
checkNWouldDelete(expl, 0);
assert.commandWorked(db[collName].remove({}));
}

View File

@ -119,11 +119,8 @@ export const $config = (function() {
// Choose a random starting point to look for mergeable chunks to make it less likely
// that each thread tries to move the same chunk.
let index = Random.randInt(chunks.length);
for (let i = 0; i < chunks.length; i++) {
if (index === chunks.length - 1) {
index = 0;
}
let index = Random.randInt(chunks.length - 1);
for (let i = 0; i < chunks.length - 1; i++) {
if (chunks[index].shard === chunks[index + 1].shard &&
defragmentationUtil.getZoneForRange(connCache.mongos[0],
randomColl.getFullName(),
@ -143,6 +140,10 @@ export const $config = (function() {
}
return;
}
index++;
if (index >= chunks.length - 1) {
index = 0;
}
}
},

View File

@ -0,0 +1,152 @@
/**
* Tests insertMany into a time-series collection during a chunk migration. This test is not
* checking results but is meant to run in sanitizers to ensure the exception handling in the
* time-series insert many code is correct.
* @tags: [
* requires_sharding,
* assumes_balancer_off,
* requires_non_retryable_writes,
* does_not_support_transactions,
* ]
*/
import {extendWorkload} from "jstests/concurrency/fsm_libs/extend_workload.js";
import {ChunkHelper} from "jstests/concurrency/fsm_workload_helpers/chunks.js";
import {
$config as $baseConfig
} from 'jstests/concurrency/fsm_workloads/sharded_moveChunk_partitioned.js';
import {findChunksUtil} from "jstests/sharding/libs/find_chunks_util.js";
export const $config = extendWorkload($baseConfig, function($config, $super) {
// A random non-round start value was chosen so that we can verify the rounding behavior that
// occurs while routing on mongos.
$config.data.startTime = 1021;
// One minute.
$config.data.increment = 1000 * 60;
// This should generate documents for a span of one month.
$config.data.numInitialDocs = 60 * 24 * 30;
$config.data.bucketPrefix = "system.buckets.";
$config.data.metaField = 'm';
$config.data.timeField = 't';
$config.threadCount = 10;
$config.iterations = 40;
$config.startState = "init";
/**
* Perform insertMany with ordered:false that may target multiple buckets across multiple chunks
*/
$config.states.insert = function insert(db, collName, connCache) {
var docs = [];
for (let i = 0; i < 10; i++) {
// Generate a random timestamp between 'startTime' and largest timestamp we inserted.
const timer =
this.startTime + Math.floor(Random.rand() * this.numInitialDocs * this.increment);
const doc = {
_id: new ObjectId(),
[this.metaField]: 0,
[this.timeField]: new Date(timer),
};
docs.push(doc);
}
// Perform unordered insertMany. When this is done concurrent with chunk migrations we may
// get an exception in mongod when only a subset of documents have been (partially)
// processed. This will be retried by mongos and no error is observed for the user. This
// test is meant to be run with sanitizers to ensure correctness.
assert.commandWorked(db[collName].insertMany(docs, {ordered: false}));
};
/**
* Moves a random chunk in the target collection.
*/
$config.states.moveChunk = function moveChunk(db, collName, connCache) {
const configDB = db.getSiblingDB('config');
const ns = db[this.bucketPrefix + collName].getFullName();
const chunks = findChunksUtil.findChunksByNs(configDB, ns).toArray();
const chunkToMove = chunks[this.tid];
const fromShard = chunkToMove.shard;
// Choose a random shard to move the chunk to.
const shardNames = Object.keys(connCache.shards);
const destinationShards = shardNames.filter(function(shard) {
if (shard !== fromShard) {
return shard;
}
});
const toShard = destinationShards[Random.randInt(destinationShards.length)];
const waitForDelete = false;
ChunkHelper.moveChunk(db,
this.bucketPrefix + collName,
[chunkToMove.min, chunkToMove.max],
toShard,
waitForDelete);
};
$config.states.init = function init(db, collName, connCache) {};
$config.transitions = {
init: {insert: 1},
insert: {insert: 7, moveChunk: 1},
moveChunk: {insert: 1, moveChunk: 0}
};
$config.setup = function setup(db, collName, cluster) {
db[collName].drop();
assert.commandWorked(db.createCollection(
collName, {timeseries: {metaField: this.metaField, timeField: this.timeField}}));
cluster.shardCollection(db[collName], {t: 1}, false);
const bulk = db[collName].initializeUnorderedBulkOp();
let currentTimeStamp = this.startTime;
for (let i = 0; i < this.numInitialDocs; ++i) {
currentTimeStamp += this.increment;
const metaVal = 0;
const doc = {
_id: new ObjectId(),
[this.metaField]: metaVal,
[this.timeField]: new Date(currentTimeStamp),
// use an invalid tid to not count these documents when we validate at teardown
tid: -1,
};
bulk.insert(doc);
}
let res = bulk.execute();
assert.commandWorked(res);
assert.eq(this.numInitialDocs, res.nInserted);
// Pick 'this.threadCount - 1' split points so that we have 'this.threadCount' chunks.
const chunkRange = (currentTimeStamp - this.startTime) / this.threadCount;
currentTimeStamp = this.startTime;
for (let i = 0; i < (this.threadCount - 1); ++i) {
currentTimeStamp += chunkRange;
assert.commandWorked(ChunkHelper.splitChunkAt(
db, this.bucketPrefix + collName, {'control.min.t': new Date(currentTimeStamp)}));
}
// Create an extra chunk on each shard to make sure multi:true operations return correct
// metrics in write results.
const destinationShards = Object.keys(cluster.getSerializedCluster().shards);
for (const destinationShard of destinationShards) {
currentTimeStamp += chunkRange;
assert.commandWorked(ChunkHelper.splitChunkAt(
db, this.bucketPrefix + collName, {'control.min.t': new Date(currentTimeStamp)}));
ChunkHelper.moveChunk(
db,
this.bucketPrefix + collName,
[{'control.min.t': new Date(currentTimeStamp)}, {'control.min.t': MaxKey}],
destinationShard,
/*waitForDelete=*/ false);
}
};
return $config;
});

View File

@ -18,6 +18,7 @@ import {FeatureFlagUtil} from "jstests/libs/feature_flag_util.js";
export const $config = extendWorkload($baseConfig, function($config, $super) {
$config.startState = "init";
$config.data.partitionSize = 100;
const customShardKeyFieldName = "customShardKey";

View File

@ -5,6 +5,9 @@
* # The test runs commands that are not allowed with security token: validateDBMetadata.
* not_allowed_with_security_token,
* no_selinux,
* # TODO SERVER-82166 remove "balancer off" tag once PM-2077 is over: migration can cause an index
* # to be created before a dropIndex commits causing the metadata validation to fail
* assumes_balancer_off,
* ]
*/
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";

View File

@ -24,14 +24,6 @@
import {assertArrayEq} from "jstests/aggregation/extras/utils.js";
import {getSingleNodeExplain} from "jstests/libs/analyze_plan.js";
import {setUpServerForColumnStoreIndexTest} from "jstests/libs/columnstore_util.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const columnstoreEnabled =
checkSBEEnabled(db, ["featureFlagColumnstoreIndexes"], true /* checkAllNodes */);
if (!columnstoreEnabled) {
jsTestLog("Skipping columnstore index test since the feature flag is not enabled.");
quit();
}
if (!setUpServerForColumnStoreIndexTest(db)) {
quit();

View File

@ -21,14 +21,6 @@ import {setUpServerForColumnStoreIndexTest} from "jstests/libs/columnstore_util.
import {DiscoverTopology} from "jstests/libs/discover_topology.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {IndexCatalogHelpers} from "jstests/libs/index_catalog_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const columnstoreEnabled =
checkSBEEnabled(db, ["featureFlagColumnstoreIndexes"], true /* checkAllNodes */);
if (!columnstoreEnabled) {
jsTestLog("Skipping columnstore index test since the feature flag is not enabled.");
quit();
}
if (!setUpServerForColumnStoreIndexTest(db)) {
quit();

View File

@ -12,15 +12,15 @@
* # server parameters are stored in-memory only so are not transferred onto the recipient.
* tenant_migration_incompatible,
* not_allowed_with_security_token,
* # Logic for when a COLUMN_SCAN plan is generated changed slightly as part of enabling more
* # queries in SBE in the 7.0 release.
* requires_fcv_70,
* # Columnstore indexes never shipped to the customers in older versions, so there is no need to
* # test multiversion suites.
* requires_fcv_72,
* ]
*/
import {aggPlanHasStage, planHasStage} from "jstests/libs/analyze_plan.js";
import {setUpServerForColumnStoreIndexTest} from "jstests/libs/columnstore_util.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js"; // TODO SERVER-80226: Remove this import
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
if (!setUpServerForColumnStoreIndexTest(db)) {
quit();
@ -170,8 +170,7 @@ explain = coll.explain().aggregate([
{$group: {_id: "$comments.author", total_views: {$sum: "$comments.views"}}}
]);
// TODO SERVER-80226: Remove 'featureFlagSbeFull' used by $unwind Pushdown feature.
if (checkSBEEnabled(db, ["featureFlagSbeFull"])) {
if (checkSbeFullyEnabled(db)) {
// The entire pipeline should be pushed down to SBE.
assert(planHasStage(db, explain, "GROUP"), explain);
assert(planHasStage(db, explain, "UNWIND"), explain);

View File

@ -7,7 +7,7 @@
//
import {getPlanStage, planHasStage} from "jstests/libs/analyze_plan.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js"; // TODO SERVER-80226: Remove this import
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const testDB = db.getSiblingDB("command_let_variables");
const coll = testDB.command_let_variables;
@ -91,10 +91,9 @@ let explain = assert.commandWorked(testDB.runCommand({
verbosity: "executionStats"
}));
if (!isMongos) {
// TODO SERVER-80226: Remove 'featureFlagSbeFull' used by $unwind Pushdown feature.
if (checkSBEEnabled(db, ["featureFlagSbeFull"])) {
if (checkSbeFullyEnabled(testDB)) {
// $unwind should be pushed down to SBE.
assert(planHasStage(db, explain, "UNWIND"), explain);
assert(planHasStage(testDB, explain, "UNWIND"), explain);
} else {
assert(explain.hasOwnProperty("stages"), explain);
assert.neq(explain.stages.length, 0, explain);

View File

@ -10,7 +10,6 @@
import {assertDropCollection} from "jstests/libs/collection_drop_recreate.js";
import {FeatureFlagUtil} from "jstests/libs/feature_flag_util.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const clustered = db.clusteredColl;
const nonClustered = db.normalColl;
@ -28,6 +27,23 @@ const docs = [{_id: 1, a: 1}, {_id: 2, a: 2}, {_id: 3, a: 3}];
assert.commandWorked(clustered.insertMany(docs));
assert.commandWorked(nonClustered.insertMany(docs));
// When given the recordId of the last record in the collection, we should receive a null
// resumeToken.
const res = assert.commandWorked(db.runCommand({
find: nonClusteredName,
filter: {},
$_requestResumeToken: true,
$_resumeAfter: {'$recordId': NumberLong(3)},
hint: {$natural: 1}
}));
assert(res.hasOwnProperty('cursor'), res);
const cursor = res['cursor'];
assert(cursor.hasOwnProperty('postBatchResumeToken'), res);
// Note that we don't perform an exact equality on 'postBatchResumeToken' because depending on
// the configuration, it may contain additional fields (such as '$initialSyncId').
assert.eq(cursor.postBatchResumeToken.$recordId, null, res);
function validateFailedResumeAfterInFind({collName, resumeAfterSpec, errorCode, explainFail}) {
const spec = {
find: collName,
@ -94,23 +110,12 @@ function testResumeAfter(validateFunction) {
errorCode: ErrorCodes.KeyNotFound
});
if (checkSBEEnabled(db)) {
// This case really means that 'forceClassicEngine' has not been set. It does not mean any
// SBE-specific feature flags are turned on.
validateFunction({
collName: nonClusteredName,
resumeAfterSpec: {'$recordId': null},
errorCode: ErrorCodes.KeyNotFound
});
} else {
assert.commandWorked(db.runCommand({
find: nonClusteredName,
filter: {},
$_requestResumeToken: true,
$_resumeAfter: {'$recordId': null},
hint: {$natural: 1}
}));
}
// Confirm $_resumeAfter token will fail with 'KeyNotFound' if given a null recordId.
validateFunction({
collName: nonClusteredName,
resumeAfterSpec: {'$recordId': null},
errorCode: ErrorCodes.KeyNotFound
});
// Confirm $_resumeAfter will fail to parse if collection does not exist.
validateFunction({

View File

@ -21,11 +21,8 @@ import {assertDropAndRecreateCollection} from "jstests/libs/collection_drop_recr
import {setUpServerForColumnStoreIndexTest} from "jstests/libs/columnstore_util.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {IndexCatalogHelpers} from "jstests/libs/index_catalog_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
const columnstoreEnabled =
checkSBEEnabled(db, ["featureFlagColumnstoreIndexes"], true /* checkAllNodes */) &&
setUpServerForColumnStoreIndexTest(db);
const columnstoreEnabled = setUpServerForColumnStoreIndexTest(db);
const collName = "hidden_index";
let coll = assertDropAndRecreateCollection(db, collName);

View File

@ -54,7 +54,7 @@ import {
ClusteredCollectionUtil
} from "jstests/libs/clustered_collections/clustered_collection_util.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
// Flag indicating if index filter commands are running through the query settings interface.
var isIndexFiltersToQuerySettings = TestData.isIndexFiltersToQuerySettings || false;
@ -356,7 +356,7 @@ assert.commandFailed(
filters = getFilters();
assert.eq(0, filters.length, tojson(filters));
if (checkSBEEnabled(db)) {
if (checkSbeRestrictedOrFullyEnabled(db)) {
//
// Test that planCacheSetFilter doesn't apply to the inner side of a $lookup.
//

View File

@ -21,11 +21,11 @@
* ]
*/
import {getPlanCacheKeyFromShape} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
// For testing convenience this variable is made an integer "1" if SBE is fully enabled, because the
// expected amount of plan cache entries differs between the SBE plan cache and the classic one.
const isSbeEnabled = checkSBEEnabled(db) ? 1 : 0;
const isSbeEnabled = checkSbeFullyEnabled(db) ? 1 : 0;
const collName = "index_filter_commands_invalidate_plan_cache_entries";
const coll = db[collName];

View File

@ -23,7 +23,7 @@
// ]
import {getAggPlanStage, getPlanStages} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
var colName = "jstests_index_stats";
var col = db[colName];
@ -239,7 +239,7 @@ assert.eq(2,
])
.itcount());
assert.eq(1, getUsageCount("_id_", col), "Expected aggregation to use _id index");
if (!checkSBEEnabled(db)) {
if (!checkSbeRestrictedOrFullyEnabled(db)) {
assert.eq(2,
getUsageCount("_id_", foreignCollection),
"Expected each lookup to be tracked as an index use");
@ -277,7 +277,7 @@ const pipeline = [
];
assert.eq(2, col.aggregate(pipeline).itcount());
assert.eq(1, getUsageCount("_id_", col), "Expected aggregation to use _id index");
if (!checkSBEEnabled(db)) {
if (!checkSbeRestrictedOrFullyEnabled(db)) {
assert.eq(2,
getUsageCount("_id_", foreignCollection),
"Expected each lookup to be tracked as an index use");

View File

@ -12,7 +12,7 @@
// requires_fcv_63,
// ]
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const t = db[jsTestName()];
t.drop();
@ -57,7 +57,7 @@ assert.commandWorked(t.insert({a: 2, b: 2}));
// SBE or the classic engine. This is because the classic engine will use a multi-interval index
// scan whereas SBE will decompose the intervals into a set of single-interval bounds and will end
// up examining 0 keys.
const isSBEEnabled = checkSBEEnabled(db);
const isSBEEnabled = checkSbeFullyEnabled(db);
let expectedKeys = isSBEEnabled ? 0 : 3;
let errMsg = function(actualNumKeys) {
return "Chosen plan examined " + actualNumKeys + " keys";

View File

@ -28,9 +28,8 @@ import {
getWinningPlan,
} from "jstests/libs/analyze_plan.js";
import {assertDropAndRecreateCollection} from "jstests/libs/collection_drop_recreate.js";
import {FeatureFlagUtil} from "jstests/libs/feature_flag_util.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.wildcard_cached_plans;
@ -51,7 +50,7 @@ function getCacheEntryForQuery(query) {
return null;
}
const isSbeEnabled = checkSBEEnabled(db);
const isSbeEnabled = checkSbeFullyEnabled(db);
for (const indexSpec of wildcardIndexes) {
coll.drop();

View File

@ -8,9 +8,9 @@
* Tests for JSON Schema document validation.
*/
import {assertSchemaMatch} from "jstests/libs/assert_schema_match.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const isSBEEnabled = checkSBEEnabled(db);
const isSBEEnabled = checkSbeFullyEnabled(db);
let coll = db.jstests_json_schema;
coll.drop();

View File

@ -16,48 +16,69 @@
// tenant_migration_incompatible,
// ]
let t = db.test_notablescan;
t.drop();
import {isClusteredIxscan} from "jstests/libs/analyze_plan.js";
import {assertDropAndRecreateCollection} from "jstests/libs/collection_drop_recreate.js";
try {
assert.commandWorked(db._adminCommand({setParameter: 1, notablescan: true}));
// commented lines are SERVER-2222
if (0) { // SERVER-2222
assert.throws(function() {
t.find({a: 1}).toArray();
});
}
t.save({a: 1});
assert.throws(function() {
t.count({a: 1});
});
function checkError(err) {
assert.includes(err.toString(), "'notablescan'");
}
const colName = jsTestName();
let coll = db.getCollection(colName);
coll.drop();
assert.commandWorked(db.adminCommand({setParameter: 1, notablescan: true}));
{
if (0) {
// TODO: SERVER-2222 This should actually throw an error as it performs a collection
// scan.
assert.throws(function() {
t.find({}).toArray();
coll.find({a: 1}).toArray();
});
}
assert.eq(1, t.find({}).itcount()); // SERVER-274
coll.insert({a: 1});
let err = assert.throws(function() {
t.find({a: 1}).toArray();
coll.count({a: 1});
});
assert.includes(err.toString(), "No indexed plans available, and running with 'notablescan'");
checkError(err);
// TODO: SERVER-2222 This should actually throw an error as it performs a collection scan.
assert.eq(1, coll.find({}).itcount());
err = assert.throws(function() {
t.find({a: 1}).hint({$natural: 1}).toArray();
coll.find({a: 1}).toArray();
});
checkError(err);
err = assert.throws(function() {
coll.find({a: 1}).hint({$natural: 1}).toArray();
});
assert.includes(err.toString(), "$natural");
assert.includes(err.toString(), "notablescan");
checkError(err);
t.createIndex({a: 1});
assert.eq(0, t.find({a: 1, b: 1}).itcount());
assert.eq(1, t.find({a: 1, b: null}).itcount());
// SERVER-4327
assert.eq(0, t.find({a: {$in: []}}).itcount());
assert.eq(0, t.find({a: {$in: []}, b: 0}).itcount());
} finally {
// We assume notablescan was false before this test started and restore that
// expected value.
assert.commandWorked(db._adminCommand({setParameter: 1, notablescan: false}));
coll.createIndex({a: 1});
assert.eq(0, coll.find({a: 1, b: 1}).itcount());
assert.eq(1, coll.find({a: 1, b: null}).itcount());
}
{ // Run the testcase with a clustered index.
assertDropAndRecreateCollection(db, colName, {clusteredIndex: {key: {_id: 1}, unique: true}})
coll = db.getCollection(colName);
assert.commandWorked(coll.insert({_id: 22}));
assert.eq(1, coll.find({_id: 22}).itcount());
let plan = coll.find({_id: 22}).explain();
// Make sure the plan has a clustered index scan.
assert(isClusteredIxscan(db, plan));
// Make sure the same works with an aggregate.
assert.eq(1, coll.aggregate([{$match: {_id: 22}}]).itcount());
plan = coll.explain().aggregate([{$match: {_id: 22}}]);
// Make sure the plan has a clustered index scan.
assert(isClusteredIxscan(db, plan));
assert.commandWorked(
db.runCommand({aggregate: colName, pipeline: [{$match: {_id: 22}}], cursor: {}}));
}
// Set it back to the original value.
assert.commandWorked(db.adminCommand({setParameter: 1, notablescan: false}));

View File

@ -9,6 +9,14 @@
import {getPlanStages, getWinningPlanFromExplain} from "jstests/libs/analyze_plan.js";
const parameterName = "internalQueryEnableBooleanExpressionsSimplifier";
const isSImplifierEnabled =
assert.commandWorked(db.adminCommand({getParameter: 1, [parameterName]: 1}))[parameterName];
if (!isSImplifierEnabled) {
jsTest.log("Skipping the Boolean simplier tests, since the simplifier is disabled...");
quit();
}
/**
* Checks possible representations of an empty filter in query plans, which can be empty object '{}'
* or missing value.

View File

@ -10,6 +10,7 @@
* incompatible_with_preimages_by_default,
* ]
*/
import {checkNWouldDelete} from "jstests/libs/analyze_plan.js";
var collName = "jstests_explain_delete";
var t = db[collName];
@ -17,33 +18,6 @@ t.drop();
var explain;
/**
* Verify that the explain command output 'explain' shows a BATCHED_DELETE stage with an
* nWouldDelete value equal to 'nWouldDelete'.
*/
function checkNWouldDelete(explain, nWouldDelete) {
assert.commandWorked(explain);
assert("executionStats" in explain);
var executionStats = explain.executionStats;
assert("executionStages" in executionStats);
// If passed through mongos, then BATCHED_DELETE stage(s) should be below the SHARD_WRITE
// mongos stage. Otherwise the BATCHED_DELETE stage is the root stage.
var execStages = executionStats.executionStages;
if ("SHARD_WRITE" === execStages.stage) {
let totalToBeDeletedAcrossAllShards = 0;
execStages.shards.forEach(function(shardExplain) {
const rootStageName = shardExplain.executionStages.stage;
assert(rootStageName === "BATCHED_DELETE", tojson(execStages));
totalToBeDeletedAcrossAllShards += shardExplain.executionStages.nWouldDelete;
});
assert.eq(totalToBeDeletedAcrossAllShards, nWouldDelete, explain);
} else {
assert(execStages.stage === "BATCHED_DELETE", explain);
assert.eq(execStages.nWouldDelete, nWouldDelete, explain);
}
}
// Explain delete against an empty collection.
assert.commandWorked(db.createCollection(t.getName()));
explain = db.runCommand({explain: {delete: collName, deletes: [{q: {a: 1}, limit: 0}]}});
@ -70,4 +44,4 @@ assert.eq(10, t.count());
// If we run the same thing without the explain, then all 10 docs should be deleted.
var deleteResult = db.runCommand({delete: collName, deletes: [{q: {a: 1}, limit: 0}]});
assert.commandWorked(deleteResult);
assert.eq(0, t.count());
assert.eq(0, t.count());

View File

@ -27,9 +27,9 @@ import {
getPlanStages,
getWinningPlan
} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const isSBEEnabled = checkSBEEnabled(db);
const isSBEEnabled = checkSbeFullyEnabled(db);
const coll = db.explode_for_sort_plan_cache;
coll.drop();
@ -68,12 +68,16 @@ function assertIsNotExplodeForSort(query) {
assert.eq(sortMerges.length, 0, explain);
}
function assertExplodeForSortCacheParameterizedCorrectly(
{query, queryCount, newQuery, newQueryCount, reuseEntry}) {
function assertQueryParameterizedCorrectly(
{query, queryCount, newQuery, newQueryCount, reuseEntry, isExplode = true}) {
// Clear plan cache to have a fresh test case.
coll.getPlanCache().clear();
assertIsExplodeForSort(query);
if (isExplode) {
assertIsExplodeForSort(query);
} else {
assertIsNotExplodeForSort(query);
}
// Run the query for the first time to create an inactive plan cache entry.
assert.eq(queryCount, coll.find(query).sort(sortSpec).itcount());
@ -131,7 +135,7 @@ for (let a = 1; a <= 3; a++) {
assertIsNotExplodeForSort({a: {$gte: 1, $lte: 1}, b: {$in: [1, 2]}});
// Changing the $eq predicate value should reuse the plan cache and gives correct results.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {a: {$eq: 2}, b: {$in: [1, 2]}},
@ -141,7 +145,7 @@ assertExplodeForSortCacheParameterizedCorrectly({
// Changing the $expr-$eq predicate value should not reuse the SBE plan cache because agg expression
// is not parameterized.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {$and: [{$expr: {$eq: ["$a", 1]}}, {b: {$in: [1, 2]}}]},
queryCount: 3,
newQuery: {$and: [{$expr: {$eq: ["$a", 2]}}, {b: {$in: [1, 2]}}]},
@ -152,7 +156,7 @@ assertExplodeForSortCacheParameterizedCorrectly({
});
// Rewriting the $in predicate with $or should reuse the plan cache and gives correct results.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {$and: [{a: {$eq: 2}}, {$or: [{b: {$eq: 1}}, {b: {$eq: 2}}]}]},
@ -162,7 +166,7 @@ assertExplodeForSortCacheParameterizedCorrectly({
// Changing the $or predicate value should reuse the plan cache and gives correct results, since $or
// is rewritten as $in.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {$and: [{a: {$eq: 1}}, {$or: [{b: {$eq: 1}}, {b: {$eq: 2}}]}]},
queryCount: 3,
newQuery: {$and: [{a: {$eq: 1}}, {$or: [{b: {$eq: 1}}, {b: {$eq: 3}}]}]},
@ -172,7 +176,7 @@ assertExplodeForSortCacheParameterizedCorrectly({
// Changing the $in predicate values but not size should reuse the plan cache and gives correct
// results.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {a: {$eq: 1}, b: {$in: [1, 3]}},
@ -182,7 +186,7 @@ assertExplodeForSortCacheParameterizedCorrectly({
// Changing the $in predicate size should not reuse the SBE plan cache but still gives correct
// results.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {a: {$eq: 1}, b: {$in: [1, 2, 3]}},
@ -193,14 +197,14 @@ assertExplodeForSortCacheParameterizedCorrectly({
// Special values in the predicate will not be parameterized hence the SBE plan cache will not be
// reused.
for (let specialValue of [null, {x: 1}, [1]]) {
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {a: {$eq: specialValue}, b: {$in: [1, 2]}},
newQueryCount: 0,
reuseEntry: !isSBEEnabled,
});
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {a: {$eq: 1}, b: {$in: [0, specialValue]}},
@ -210,10 +214,51 @@ for (let specialValue of [null, {x: 1}, [1]]) {
}
// Regex in $in predicate will not reuse plan cache.
assertExplodeForSortCacheParameterizedCorrectly({
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: [1, 2]}},
queryCount: 3,
newQuery: {a: {$eq: 1}, b: {$in: [0, /a|regex/]}},
newQueryCount: 0,
reuseEntry: false,
});
const maxScansToExplode = assert.commandWorked(db.adminCommand(
{getParameter: 1, internalQueryMaxScansToExplode: 1}))["internalQueryMaxScansToExplode"];
const maxExplodeIn = [];
for (let i = 0; i < maxScansToExplode; ++i) {
maxExplodeIn.push(i);
}
const tooLargeToExplodeIn = maxExplodeIn.concat([maxScansToExplode]);
const evenLargerIn = tooLargeToExplodeIn.concat([maxScansToExplode + 1]);
// Test that an $in with as many elements as the "max scans to explode" parameter uses explode for
// sort and is parameterized correctly.
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: maxExplodeIn}},
queryCount: 6,
newQuery: {a: {$eq: 2}, b: {$in: maxExplodeIn}},
newQueryCount: 12,
reuseEntry: true,
});
// Test that in SBE a query with explode for sort optimization will use different plan cache
// entry than the same query with too many scans to explode.
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: maxExplodeIn}},
queryCount: 6,
newQuery: {a: {$eq: 1}, b: {$in: tooLargeToExplodeIn}},
newQueryCount: 6,
reuseEntry: !isSBEEnabled,
});
// Test that a query with more than "max scans to explode" will use the same plan cache
// entry for any number of elements in $in.
assertQueryParameterizedCorrectly({
query: {a: {$eq: 1}, b: {$in: tooLargeToExplodeIn}},
queryCount: 6,
newQuery: {a: {$eq: 1}, b: {$in: evenLargerIn}},
newQueryCount: 6,
reuseEntry: true,
isExplode: false
});

View File

@ -5,7 +5,7 @@
// ]
import {getAggPlanStage, getPlanStage, hasRejectedPlans} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.expr_index_use;
coll.drop();
@ -50,7 +50,7 @@ assert.commandWorked(coll.insert({w: {z: 2}}));
assert.commandWorked(coll.createIndex({w: 1}));
assert.commandWorked(coll.createIndex({"w.z": 1}));
const isSBEEnabled = checkSBEEnabled(db);
const isSBEEnabled = checkSbeFullyEnabled(db);
/**
* Executes the expression 'expr' as both a find and an aggregate. Then confirms

View File

@ -5,7 +5,7 @@
// ]
// Include helpers for analyzing explain output.
import {getWinningPlan, isIdhack} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const t = db.idhack;
t.drop();
@ -58,7 +58,7 @@ winningPlan = getWinningPlan(explain.queryPlanner);
assert(!isIdhack(db, winningPlan), winningPlan);
// Covered query returning _id field only can be handled by ID hack.
const parentStage = checkSBEEnabled(db) ? "PROJECTION_COVERED" : "FETCH";
const parentStage = checkSbeFullyEnabled(db) ? "PROJECTION_COVERED" : "FETCH";
explain = t.find(query, {_id: 1}).explain();
winningPlan = getWinningPlan(explain.queryPlanner);
assert(isIdhack(db, winningPlan), winningPlan);

View File

@ -13,7 +13,6 @@
//
import {resultsEq} from "jstests/aggregation/extras/utils.js";
import {setUpServerForColumnStoreIndexTest} from "jstests/libs/columnstore_util.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
function extractAValues(results) {
return results.map(function(res) {
@ -787,9 +786,7 @@ const keyPatterns = [
];
// Include Columnstore Index only if FF is enabled and collection is not clustered.
const columnstoreEnabled =
checkSBEEnabled(db, ["featureFlagColumnstoreIndexes"], true /* checkAllNodes */);
if (columnstoreEnabled && setUpServerForColumnStoreIndexTest(db)) {
if (setUpServerForColumnStoreIndexTest(db)) {
keyPatterns.push({keyPattern: {"$**": "columnstore"}});
}

View File

@ -18,11 +18,13 @@ import {
getWinningPlan
} from "jstests/libs/analyze_plan.js";
import {assertDropCollection} from "jstests/libs/collection_drop_recreate.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeRestrictedOrFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.or_use_clustered_collection;
assertDropCollection(db, coll.getName());
const isSbeGroupEnabled = checkSbeRestrictedOrFullyEnabled(db);
// Create a clustered collection and create indexes.
assert.commandWorked(
db.createCollection(coll.getName(), {clusteredIndex: {key: {_id: 1}, unique: true}}));
@ -155,7 +157,7 @@ function validateQueryPlan({query, expectedStageCount, expectedDocIds, noFetchWi
}
// Classic engine doesn't have a GROUP stage like SBE for $group.
if (group && !checkSBEEnabled(db)) {
if (group && !isSbeGroupEnabled) {
test.additionalStages["GROUP"] = 0;
}

View File

@ -19,14 +19,9 @@
// tenant_migration_incompatible,
// # TODO SERVER-67607: Test plan cache with CQF enabled.
// cqf_experimental_incompatible,
// featureFlagSbeFull,
// ]
import {getLatestProfilerEntry} from "jstests/libs/profiler.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
if (!checkSBEEnabled(db)) {
jsTestLog("Skipping test because SBE is disabled");
quit();
}
const testDb = db.getSiblingDB(jsTestName());
assert.commandWorked(testDb.dropDatabase());

View File

@ -18,7 +18,7 @@
// tenant_migration_incompatible,
// ]
import {getPlanCacheKeyFromExplain} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
var coll = db.collation_plan_cache;
coll.drop();
@ -54,7 +54,7 @@ assert.commandWorked(
var shapes = coll.aggregate([{$planCacheStats: {}}]).toArray();
assert.eq(1, shapes.length, 'unexpected cache size after running query');
const isSbeEnabled = checkSBEEnabled(db);
const isSbeEnabled = checkSbeFullyEnabled(db);
if (!isSbeEnabled) {
assert.eq(shapes[0].createdFromQuery.query, {a: 'foo', b: 5}, shapes);
assert.eq(shapes[0].createdFromQuery.sort, {}, shapes);

View File

@ -0,0 +1,50 @@
/**
* Test a rooted $or query with duplicate predicates which reproduces SERVER-84338, a bug in the
* MatchExpression $or->$in rewrite which produced incorrect plans in the SBE plan cache.
*
* @tags: [
* # The test runs commands that are not allowed with security token: planCacheClear.
* not_allowed_with_signed_security_token,
* # This test attempts to perform queries and introspect/manipulate the server's plan cache
* # entries. The former operation may be routed to a secondary in the replica set, whereas the
* # latter must be routed to the primary.
* assumes_read_concern_unchanged,
* assumes_read_preference_unchanged,
* does_not_support_stepdowns,
* # If all chunks are moved off of a shard, it can cause the plan cache to miss commands.
* assumes_balancer_off,
* assumes_unsharded_collection,
* # Plan cache state is node-local and will not get migrated alongside tenant data.
* tenant_migration_incompatible,
* ]
*/
const coll = db.server84338;
coll.drop();
const docs = [
{_id: 1, foo: 1},
{_id: 2, foo: 2},
];
assert.commandWorked(coll.insert(docs));
const predicate = {
$or: [{_id: 1, foo: 1}, {_id: 1, foo: 999}]
};
const predicate2 = {
$or: [{_id: 2, foo: 2}, {_id: 2, foo: 999}]
};
// This query places an entry in the SBE plan cache.
assert.eq([{_id: 1, foo: 1}], coll.find(predicate).toArray());
// This query reuses this entry from the cache.
assert.eq([{_id: 2, foo: 2}], coll.find(predicate2).toArray());
coll.getPlanCache().clear();
assert.eq(
[{_id: null, s: 1}],
coll.aggregate([{$match: predicate}, {$group: {_id: null, s: {$sum: "$foo"}}}]).toArray());
assert.eq(
[{_id: null, s: 2}],
coll.aggregate([{$match: predicate2}, {$group: {_id: null, s: {$sum: "$foo"}}}]).toArray());

View File

@ -24,7 +24,7 @@
import {getPlanCacheKeyFromPipeline, getPlanCacheKeyFromShape} from "jstests/libs/analyze_plan.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.jstests_plan_cache_clear;
coll.drop();
@ -183,7 +183,7 @@ const nonExistentColl = db.plan_cache_clear_nonexistent;
nonExistentColl.drop();
assert.commandWorked(nonExistentColl.runCommand('planCacheClear'));
if (checkSBEEnabled(db)) {
if (checkSbeFullyEnabled(db)) {
// Plan cache commands should work against the main collection only, not foreignColl
// collections, when $lookup is pushed down into SBE.
const foreignColl = db.plan_cache_clear_foreign;

View File

@ -36,12 +36,12 @@ import {
} from "jstests/libs/analyze_plan.js";
import {FeatureFlagUtil} from "jstests/libs/feature_flag_util.js";
import {QuerySettingsUtils} from "jstests/libs/query_settings_utils.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
let coll = db.jstests_plan_cache_list_plans;
coll.drop();
const isSbeEnabled = checkSBEEnabled(db);
const isSbeEnabled = checkSbeFullyEnabled(db);
function dumpPlanCacheState() {
return coll.aggregate([{$planCacheStats: {}}]).toArray();

View File

@ -16,9 +16,9 @@
// # TODO SERVER-67607: Test plan cache with CQF enabled.
// cqf_experimental_incompatible,
// ]
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
if (checkSBEEnabled(db)) {
if (checkSbeFullyEnabled(db)) {
jsTest.log("Skipping test because SBE is enabled.");
quit();
}

View File

@ -24,11 +24,11 @@
* assumes_no_implicit_index_creation,
* ]
*/
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const coll = db.plan_cache_sbe;
coll.drop();
const isSbeEnabled = checkSBEEnabled(db);
const isSbeEnabled = checkSbeFullyEnabled(db);
assert.commandWorked(coll.insert({a: 1, b: 1}));

View File

@ -13,15 +13,9 @@
* assumes_standalone_mongod,
* # TODO SERVER-67607: Test plan cache with CQF enabled.
* cqf_experimental_incompatible,
* featureFlagSbeFull,
* ]
*/
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
if (!checkSBEEnabled(db)) {
jsTest.log("Skip running the test because SBE is not enabled");
quit();
}
const coll = db.plan_cache_sbe;
coll.drop();

View File

@ -17,9 +17,9 @@
// ]
import {assertArrayEq} from "jstests/aggregation/extras/utils.js";
import {getPlanCacheKeyFromShape} from "jstests/libs/analyze_plan.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
import {checkSbeFullyEnabled} from "jstests/libs/sbe_util.js";
const isSbeEnabled = checkSBEEnabled(db);
const isSbeEnabled = checkSbeFullyEnabled(db);
var coll = db.jstests_plan_cache_shell_helpers;
coll.drop();

View File

@ -10,7 +10,6 @@
// tenant_migration_incompatible,
// # TODO SERVER-67607: Test plan cache with CQF enabled.
// cqf_experimental_incompatible,
// requires_fcv_71,
// ]
import {getPlanCacheKeyFromExplain} from "jstests/libs/analyze_plan.js";
import {FixtureHelpers} from "jstests/libs/fixture_helpers.js";

View File

@ -12,15 +12,10 @@
* # server parameters are stored in-memory only so are not transferred onto the recipient.
* tenant_migration_incompatible,
* not_allowed_with_security_token,
* featureFlagSbeFull,
* ]
*/
import {setUpServerForColumnStoreIndexTest} from "jstests/libs/columnstore_util.js";
import {checkSBEEnabled} from "jstests/libs/sbe_util.js";
if (!checkSBEEnabled(db, ["featureFlagColumnstoreIndexes"])) {
jsTestLog("Skipping test since columnstore Indexes are not enabled");
quit();
}
if (!setUpServerForColumnStoreIndexTest(db)) {
quit();

Some files were not shown because too many files have changed in this diff Show More