Compare commits

...

223 Commits
master ... v7.1

Author SHA1 Message Date
Mikhail Shchatko
56948a0181 SERVER-84383 Fix multiversion setup AttributeError 2023-12-27 09:17:36 +00:00
Paolo Polato
e175711195 SERVER-81508 Avoid double execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown.
(cherry picked from commit bec596c52e)
2023-12-19 22:26:17 +00:00
Anthony Pratti
ff7d61461b SERVER-83626 make validate_commit_message pattern more resilient 2023-12-11 17:31:06 +00:00
Luke Chen
359392c8fe Import wiredtiger: bf1c183a51675c2e8c26bc335aef28912738f56a from branch mongodb-7.1
ref: b3d7955819..bf1c183a51
for: 7.1.2

WT-12036 Add Windows-specific scheduling workaround when locking dhandles
2023-12-11 02:23:19 +00:00
Luke Chen
b1d9295c89 Import wiredtiger: b3d7955819e257687946c7a168868fc12e07d6eb from branch mongodb-7.1
ref: 586b722571..b3d7955819
for: 7.1.2

WT-11777 Fix units of __wt_timer_evaluate() calls: logging and progress period
2023-12-11 02:23:19 +00:00
Mathis Bessa
5fac17f9be Revert "SERVER-79658 Verify network metrics are advanced in response to traffic"
This reverts commit 500ea84bd6.
2023-12-08 20:09:04 +00:00
Matthew Boros
06b0374ac1 SERVER-80922: Fix inconsistent output field ordering in $setWindowField 2023-12-07 19:53:47 +00:00
Juan Gu
c95347834e SERVER-83866 Update BACKPORTS_REQUIRED_BASE_URL from mongodb/mongo to… (#17380)
(cherry picked from commit 579c166256cfe8a76081ae71b095b7a4c105d252)
2023-12-06 02:14:29 +00:00
Yu Jin Kang Park
fd2749a608 SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone 2023-11-29 09:33:33 +00:00
Juan Gu
d8d06353df SERVER-83592 Add resmoke flag --enable_enterprise_tests enable enterprise js tests
(cherry picked from commit d463d338460a26792c33e173c7cd475535842812)
2023-11-28 23:58:40 +00:00
Juan Gu
2c51119052 SERVER-82449 Optimize copybara sync behavior for specific no-change scenarios (#16427)
(cherry picked from commit c55308ba92)
2023-11-28 01:59:39 +00:00
Juan Gu
0f18c03ce4 SERVER-82043 Enhancement of Commit Message Validation for 10gen/mongo Commits (#16160)
(cherry picked from commit 4dc9f17146)
2023-11-28 00:57:53 +00:00
Juan Gu
e88edf5542 SERVER-78687 Set up copybara syncing between 10gen/mongo and 10gen/mongo-copybara
(cherry picked from commit 750406e4af)

SERVER-81377 Adapt sync to allow copybara failure when there are no new commits to sync

(cherry picked from commit 032b931e4c)
2023-11-27 23:18:37 +00:00
Luke Chen
eb10134f26 Import wiredtiger: 586b72257100995a43001215e62846178b39a252 from branch mongodb-7.1
ref: af248ba3f8..586b722571
for: 7.1.2

WT-11888 Fix Evergreen Python version detection on macOS
2023-11-27 01:31:42 +00:00
Luke Chen
7ce494b73b Import wiredtiger: af248ba3f8cfdcd0b3f23676659d007f1c9980b1 from branch mongodb-7.1
ref: 518b0ef698..af248ba3f8
for: 7.1.2

WT-11763 Temporarily disable force-stop testing in timestamp_abort
2023-11-27 01:31:42 +00:00
Luke Chen
7d92ec0c4f Import wiredtiger: 518b0ef698507059c869a369ea16a6d6558320d4 from branch mongodb-7.1
ref: 4e337e924d..518b0ef698
for: 7.1.2

WT-11297 backup:query_id can return wrong IDs after crash, causing failure or corruption of next incremental backup (v7.1 backport).
2023-11-27 01:31:42 +00:00
Luke Chen
d6e003ba95 Import wiredtiger: 4e337e924df73e0fcdd2152ee185e3cb75d8c927 from branch mongodb-7.1
ref: 8f162b578e..4e337e924d
for: 7.1.2

WT-11774 Add diagnostic stat to investigate eviction server's inability to queue pages
2023-11-27 01:31:42 +00:00
Paolo Polato
6704c95b3a SERVER-81603 Set the stream worker thread of the balancer as interruptible
(cherry picked from commit 0044527f9a)
2023-11-24 15:59:00 +00:00
Yu Jin Kang Park
eb4361b305 SERVER-83168 Make index build entry removal after commit uninterruptible 2023-11-23 10:40:19 +00:00
Yu Jin Kang Park
82269b093d SERVER-82610 Fix setNewIndexBuildsBlocked not unset on setFCV interrupt 2023-11-22 14:32:02 +00:00
Haley Connelly
146a2e018b SERVER-81978 handle StorageUnavailableExceptions in repl::applyCommand_inlock()
(cherry picked from commit bc2e4b24b5)
2023-11-17 18:48:53 +00:00
Adrian Gonzalez
6985f8a38d SERVER-82633 Unschedule oidc_e2e_ping.js
(cherry picked from commit 8dd542c1a5)
2023-11-14 22:44:10 +00:00
Simon Eismann
81c7c40ac5 SERVER-82555 Use shallow clones for performance tests 2023-11-14 15:48:17 +00:00
Alice Doherty
d1484a5f23 SERVER-82708 [v7.1] Update variants used to performance test stable branches 2023-11-14 15:06:39 +00:00
Israel Hsu
929b9eadbb SERVER-82313 Uses proper TaskExecutor for canceling txn 2023-11-13 22:33:17 +00:00
Matthew Boros
dd51e3dbc3 SERVER-79924 Pass correct value of isCountLike attribute to subqueries 2023-11-11 04:34:23 +00:00
Sanika Phanse
1a59b960ea SERVER-81427 Check feature flag is enabled on both shards 2023-11-10 22:50:17 +00:00
kauboy26
f4b1d3c5e7 SERVER-81591 synchronize step up for PrimaryOnlyService in stopReplicationAndEnforceNewPrimaryToCatchUp 2023-11-10 22:05:41 +00:00
Yu Jin Kang Park
e33a721ee0 SERVER-81977 Fix index_build_killop_secondary_before_commit.js failpoint 2023-11-09 14:23:52 +00:00
Kruti Shah
7c100b2025 SERVER-82799 Increase reshardingCriticalSectionTimeoutMillis for resharding_update_tag_zones.js
(cherry picked from commit d6548865b5)
2023-11-08 21:08:14 +00:00
Wei Hu
9fe1ad3feb SERVER-82028 When renaming a time series collection, the temp name should start with system.buckets prefix 2023-11-07 16:16:26 +00:00
Jordi Olivares Provencio
1339ea1cb7 SERVER-80974 Defer untimestamped drops until the catalog is checkpointed 2023-11-07 15:14:39 +00:00
Aitor Esteve Alvarado
4b314de270 SERVER-82328 Protect concurrent access to _doc in MovePrimaryCoordinator
(cherry picked from commit 669a23f588)
2023-11-07 11:31:03 +00:00
Jordi Olivares Provencio
0cd223cafc SERVER-81028 Fix $listCatalog behavior during concurrent collection renames 2023-11-06 17:22:17 +00:00
Tommaso Tocci
4f10e5b8fd SERVER-82803 CheckMetadataConsistency hook should ignore NetworkInterfaceExceededTimeLimit errors
(cherry picked from commit 8558c0fc4d)
2023-11-06 16:15:11 +00:00
Tommaso Tocci
86aead28bb SERVER-81942 ShardingDDLCoordinator should retry on LockTimeout errors
(cherry picked from commit 0391da8da8)
2023-11-06 12:25:58 +00:00
Tommaso Tocci
e685ee8f9a SERVER-81133 Speedup logic to persist routing table cache
(cherry picked from commit 5a8d10b236)
2023-11-06 11:14:17 +00:00
Romans Kasperovics
7755281ad2 SERVER-81295 Fix v1/v2 change stream resume token transition
Change stream implementation assumes change events are totally ordered by event '_id', which also serves as a resume token. In server versions prior to v7.0 the default resume token version is v1. Starting from v7.0 the default resume token version is v2, but the server still supports clients supplying v1 resume tokens (e.g., after server upgrade).

The token version is a part of a token and all v1 tokens sort before v2 tokens. To ensure the correct event ordering, the server from v7.0 generates v1 tokens to be compared with the client's v1 token until the referred event is either located or surpassed.

In this commit we fix the following issues:

When resuming from the event within a transaction we need to consider 'txnOpIndex', because the whole transaction gets the same timestamp.
Splitting large events is only supported with v2 tokens. If a resume token is a high-watermark v1 token, the next event sharing the same timestamp will have token version v1. If this event is over 16MB, splitting it will fail because of the token version. To fix this, we convert the client's high-watermark v1 token to v2.
2023-11-03 00:00:22 +00:00
Robert Sander
8a7d0eaae2 SERVER-81340 Don't run CheckMetadataConsistency for incompatible test in integration_tests_sharded suite
(cherry picked from commit 11871186a5)
2023-11-02 12:44:02 +00:00
Adi Zaimi
1fe317acc7 SERVER-82428 Include idle connections in currentOp aggregate cmd in fsync.js
Include idle connections in the aggregate command currentOp
in waitUntilOpCountIs() function for fsync.js test.
2023-11-02 06:57:47 +00:00
Sanika Phanse
42d407a714 SERVER-78530 Enable featureFlagShardKeyIndexOptionalHashedSharding 2023-11-01 17:54:56 +00:00
Dan Larkin-York
f11871c1e2 SERVER-80358 Protect bucket reopenings against concurrent disk access
Co-authored-by: Matt Kneiser <matt.kneiser@mongodb.com>
(cherry picked from commit 4cffcc49e0)
2023-11-01 14:53:52 +00:00
Max Hirschhorn
f6067c17d0 SERVER-82364 Fix $config.transitions table for analyze_shard_key.js FSM.
Fills in a missing transition from the 'listSampledQueries' state to the
'find' state.

(cherry picked from commit b48239aea5)
2023-11-01 03:18:06 +00:00
Wenqin Ye
3933880bc3 SERVER-82234: Relax assertions in session_pooling.js 2023-10-31 19:59:42 +00:00
Alyssa Wagenmaker
eb55125b8d SERVER-80878 Add QueryStatsStore insertion/eviction listener to track size 2023-10-31 15:02:16 +00:00
Pierlauro Sciarelli
4680956cc0 SERVER-81241 Range deleter processor must gracefully handle task rescheduling during shutdown 2023-10-31 13:31:19 +00:00
Pierlauro Sciarelli
e117747131 SERVER-77479 Set MigrationSourceManager::_completion to an error when the migration commit/cleanup has not completed 2023-10-31 12:37:51 +00:00
Juan Gu
42082dfdb2 SERVER-81467 Run Jepsen list-append in Evergreen
(cherry picked from commit a2045d8f61)
2023-10-30 17:58:09 +00:00
Pol Pinol Castuera
59c8c6ca5e SERVER-82220 Avoid invariant during assertIsPrimaryShardForDb
(cherry picked from commit 626e868347)
2023-10-30 14:17:15 +00:00
Foteini Alvanaki
4120fda44e SERVER-81390 Use collator to create the record key in hash_agg 2023-10-27 11:05:39 +00:00
Rui Liu
55a514ccc7 SERVER-82204 Make classic $first/$last window functions generate null on missing input
(cherry picked from commit 26ba1c041a)
2023-10-26 12:55:34 +00:00
Luke Chen
c21235b1e9 Import wiredtiger: 8f162b578e91c1b629d1ec1c70fb339b6b2f201e from branch mongodb-7.1
ref: bbbf868a3a..8f162b578e
for: 7.1.1

WT-11586 Skip test_compact03.py when tiered is enabled
2023-10-26 04:10:35 +00:00
Luke Chen
46c0129df7 Import wiredtiger: bbbf868a3a28fac540aaf5dea02b9fae41910fd3 from branch mongodb-7.1
ref: b1e9bc16f5..bbbf868a3a
for: 7.1.1

WT-7929 Investigate a solution to avoid FTDC stalls during checkpoint
2023-10-26 04:10:35 +00:00
Luke Chen
212781dddd Import wiredtiger: b1e9bc16f5807e43653972d56fb3e5456aee5624 from branch mongodb-7.1
ref: bb607d67a2..b1e9bc16f5
for: 7.1.1

WT-11584 fix test checkpoint04 test
2023-10-26 04:10:35 +00:00
Mariano Shaar
45daedd069 SERVER-81049 Move queryStatsRead and queryStatsReadTransformed privileges into clusterMonitor builtin role 2023-10-24 17:43:36 +00:00
Pol Pinol Castuera
7258a517fd SERVER-82324 Fix data race when reading/writing the logical session id
(cherry picked from commit 2911056b7f)
2023-10-24 15:22:51 +00:00
Marcos José Grillo Ramirez
80690d8641 SERVER-82069 Call resumeMigrations outside of a ScopeGuard when registering indexes in the sharding catalog
(cherry picked from commit 1319f2ec72)
2023-10-20 13:01:22 +00:00
Alice Doherty
061d7f5bff SERVER-82178 [v7.1] Update references to ycsb_like_queryable_encrypt1_cfdefault_sharded in system_perf.yml 2023-10-20 11:08:42 +00:00
Randolph Tan
707cc90d9c SERVER-81201 Add a way to limit the documents buffered by the MigrationBatchFetcher
(cherry picked from commit 6d6506f4ba)
2023-10-20 00:32:29 +00:00
Tommaso Tocci
c0252c0030 SERVER-81966 Avoid modification of previous ChunkMap instances during refresh 2023-10-19 20:58:03 +00:00
Jordi Serra Torrens
b301df7c32 SERVER-80886 Wrap ShardServerProcessInterface routing-like code with DBPrimaryRouter
(cherry picked from commit fff4dbf400)
2023-10-19 11:36:21 +00:00
Aitor Esteve Alvarado
5f8e7802a8 SERVER-81985 Enforce _flushRoutingTableCacheUpdates only on collections
(cherry picked from commit 613bffe276)
2023-10-19 08:32:42 +00:00
Allison Easton
bb0afb597e SERVER-81343 Add NamespaceNotFound as an expected error for resharding on random_DDL_CRUD_operations.js
(cherry picked from commit c4e0469e88)
2023-10-18 13:32:35 +00:00
Aitor Esteve Alvarado
94572311d3 SERVER-81106 Wait for changes to catalog cache to be persisted before cloning phase
(cherry picked from commit 1fd63a916573a6c791282ee37637b513fe410385)
2023-10-18 12:50:08 +00:00
Pol Pinol Castuera
a332192a12 SERVER-71819 Broadcast collMod command to all shards
(cherry picked from commit eec54ec63e)

SERVER-81033 Ignore the `collMod` response from the db primary shard if it has no chunks

(cherry picked from commit 76ef13cd2e)
2023-10-17 14:32:22 +00:00
Varun Ravichandran
43524bbb3d SERVER-79384: Allow server to startup with unresponsive OIDC issuer discovery or JWKS endpoints
(cherry picked from commit 39cb2c5db0)
2023-10-17 13:51:31 +00:00
Paolo Polato
f387ede496 Revert "SERVER-79937 Avoid waiting for replication while defragmenting a collection"
This reverts commit b9400522fa.
2023-10-17 09:41:18 +00:00
Pol Pinol Castuera
87b932b174 SERVER-81238 Make local collMod not assert on movePrimary in progress
(cherry picked from commit ee29248bdb)
2023-10-17 07:46:23 +00:00
Silvia Surroca
e57d0b9f1a SERVER-78851 movePrimary may fail on clone phase if out runs concurrently
(cherry picked from commit a95a5b2ee3)
2023-10-17 05:55:36 +00:00
Gregory Noma
a24f8791f9 SERVER-80203 Normalize metadata for time-series insert targeting
(cherry picked from commit 1a77b9c218)
2023-10-16 13:45:00 +00:00
Rui Liu
a1022e2465 SERVER-82070 Return default value for $stdDevSamp with empty window
(cherry picked from commit 075e355145)
2023-10-12 14:38:55 +00:00
Cheahuychou Mao
effe0e8d63 SERVER-81939 Fix helper function name
(cherry picked from commit e7760aa776)
2023-10-09 19:51:15 +00:00
Cheahuychou Mao
430e7cfa31 SERVER-81939 Make configureQueryAnalyzer and analyzeShardKey command check that input namespace is correctly formatted
(cherry picked from commit 18e008f317)
2023-10-09 19:51:15 +00:00
Maria Prinus
217c5457fa SERVER-81872 Bump commit for 7.1.0 releases 2023-10-04 19:38:18 +00:00
Gil Alon
7bff196d50 SERVER-80964 [v7.1] Delete $out to timeseries multiversion test due to 7.0 backport 2023-09-26 21:48:38 +00:00
Rushan Chen
aae2971134 SERVER-77427 revert 2023-09-26 14:45:02 +00:00
dylrich
93d07ebf6d SERVER-81202: use host environment when signing 2023-09-25 16:58:28 +00:00
Jordi Serra Torrens
d81bcfcd4a SERVER-80859 Reshuffle UpdateStage/DeleteStage's logic to skip restore 2023-09-25 15:31:22 +00:00
Adityavardhan Agrawal
10917675e4 SERVER-80021 Use format fmt to convert double to string
(cherry picked from commit 052ff0258a)

SERVER-81077 Change ExpressionConvert test to convert double to string

(cherry picked from commit 39a1309511)
2023-09-22 19:05:46 +00:00
Alyssa Wagenmaker
b0f6a3f641 SERVER-81140 Wait for FCV commit before restart in timeseries_collection_mixed_type.js 2023-09-22 18:25:05 +00:00
W. Brad Moore
b5b948acbd SERVER-80677: Cert failures due to parallel tests
(cherry picked from commit 6cd4c9f9265c60dfb49791a7b538201716c8b525)
2023-09-21 21:57:32 +00:00
madelinezec
dc03829c2f SERVER-81103 disable mirroredReads in plan_cache_stats_all_hosts_sharded 2023-09-21 21:16:15 +00:00
Allison Easton
61a2e95b35 SERVER-81148 Disable featureFlagCheckForDirectShardOperations
(cherry picked from commit cc413218c5)
2023-09-21 20:30:44 +00:00
Matt Broadstone
f30230307b SERVER-81007 Forward errors thrown in async run callbacks 2023-09-20 23:48:10 +00:00
Wenqin Ye
d0ab228bcf SERVER-81210: Fix failing asserts on 7.1 due to backporting of SERVER-44422 to 7.0 2023-09-20 21:30:50 +00:00
Yuhong Zhang
8da709d3f6 SERVER-81044 Handle internal oplog update correctly in transactions
(cherry picked from commit 9d5cd297f1)
2023-09-20 18:15:19 +00:00
Nandini Bhartiya
576f3bfd14 SERVER-81198: Fix last-lts entry in backports_required_for_multiversion_tests.yml
(cherry picked from commit 767799c0a6ed4fd2311abf0ac392ae74f4286aee)
2023-09-19 20:50:08 +00:00
Suganthi Mani
517336c797 SERVER-72128 Make tenantId optional in tenant migration donor state document.
(cherry picked from commit 988ca618ba)
2023-09-19 17:51:44 +00:00
Steve Gross
c9199f5661 SERVER-80752 Increase AMI size for windows compile
(cherry picked from commit 42d3dd73c6)
2023-09-19 15:51:47 +00:00
Jiawei Yang
ba0c01e0ca SERVER-77638 Add logging of metrics on completion of resharding 2023-09-19 05:13:21 +00:00
Gil Alon
b15f6474d2 SERVER-81067 Relax requirement on timeseries multiversion test to allow multiple internalUnpackBucket stages 2023-09-18 18:00:30 +00:00
Nandini Bhartiya
61c872f2e9 SERVER-79682: Ensure the opCtx is interrupted during a stepdown for the shardSvrReshardCollection cmd.
(cherry picked from commit 90680ac48281685551dad1253986be0c50de84bc)
2023-09-18 17:19:53 +00:00
Yu Jin Kang Park
51f14bb054 SERVER-79664 Rethrow WCE, TUE, TransactionTooLargeForCache in _applyOperationsForTransaction 2023-09-18 16:23:27 +00:00
Suganthi Mani
a1cac54a17 SERVER-81014 Fix shard merge recipient abort GC issue and add js tests.
(cherry picked from commit 97b87248d1)
2023-09-18 09:45:17 +00:00
Suganthi Mani
3ff9bad79c SERVER-75595 Improve logging in tenant migration donor & recipient service.
(cherry picked from commit 6c7b13749a)
2023-09-18 09:45:17 +00:00
Suganthi Mani
36201bb1a3 SERVER-80216 Re-enable legacy tenant migration protocol test coverage in Serverless suite.
(cherry picked from commit 47c21734c2)
2023-09-18 09:45:17 +00:00
Suganthi Mani
e1fcd6d2a0 SERVER-80785 Fix the race in tenant_migration_donor_rollback_recovery.js.
(cherry picked from commit 5d28f330f5)
2023-09-18 09:45:17 +00:00
Suganthi Mani
1bc847cc61 SERVER-80702 Fix race in serverless_reject_multiple_ops_migration_fails.js.
(cherry picked from commit d1954c6b7b)
2023-09-18 09:45:17 +00:00
Suganthi Mani
9d2fb3b045 SERVER-74804 Enable abort migration support in merge passthrough suites.
(cherry picked from commit d8bdffc35f)
2023-09-18 09:45:17 +00:00
Etienne Petrel
eeba6d2f1d Import wiredtiger: bb607d67a256de96493ee44c0e14bfb44caeeab8 from branch mongodb-7.1
ref: 7d337ec4cd..bb607d67a2
for: 7.1.0-rc3

WT-11664 Fix test_truncate22 timestamp usage
2023-09-18 03:44:46 +00:00
Etienne Petrel
1c58fb3483 Import wiredtiger: 7d337ec4cd18c6762d5512c0269233ef0d61f217 from branch mongodb-7.1
ref: b7fb7fc642..7d337ec4cd
for: 7.1.0-rc3

WT-11566 Fast truncate hang when applying commit timestamp
2023-09-18 00:18:58 +00:00
Etienne Petrel
6677809b63 Import wiredtiger: b7fb7fc6427955a04885c8dd72f738aae62e57bf from branch mongodb-7.1
ref: 931ba8bab0..b7fb7fc642
for: 7.1.0-rc3

Revert "WT-10807 Evict the pages that have all deleted items
2023-09-18 00:18:58 +00:00
Etienne Petrel
631aea9547 Import wiredtiger: 931ba8bab0b80eb471df9b8a741cd4076304a1d3 from branch mongodb-7.1
ref: d23e3d8348..931ba8bab0
for: 7.1.0-rc3

WT-11602 Hide expected eviction failures from the application and don't rollback in case of errors
2023-09-18 00:18:58 +00:00
Etienne Petrel
5e211cb328 Import wiredtiger: d23e3d8348d7895585e47872df0dbcc119ad5586 from branch mongodb-7.1
ref: 542d756f1d..d23e3d8348
for: 7.1.0-rc3

WT-11579 Fix test_prepare_mod_sort ASAN failure
2023-09-18 00:18:58 +00:00
Etienne Petrel
ce3c6455e0 Import wiredtiger: 542d756f1d33d9eb1b6f8aaa5ec04a37633e64c6 from branch mongodb-7.1
ref: ba3c3f9a0d..542d756f1d
for: 7.1.0-rc3

WT-11491 Log the WiredTiger time spent during startup and shutdown
2023-09-18 00:18:58 +00:00
Etienne Petrel
d6fa27a83c Import wiredtiger: ba3c3f9a0d74b069f16c5f05a277511f39e62ab6 from branch mongodb-7.1
ref: 77631502b5..ba3c3f9a0d
for: 7.1.0-rc3

WT-11460 Use atomic add to increment the btree write generation number
2023-09-18 00:18:58 +00:00
Etienne Petrel
96557f3f2c Import wiredtiger: 77631502b5aef0371ea9912c4f8f24c30878ef6c from branch mongodb-7.1
ref: 96e3f8375d..77631502b5
for: 7.1.0-rc3

WT-11604 Add more files to .gitignore
2023-09-18 00:18:58 +00:00
Etienne Petrel
00ee55d20e Import wiredtiger: 96e3f8375df720ea18d752049b8326bc5b9c3c62 from branch mongodb-7.1
ref: 9a1377813a..96e3f8375d
for: 7.1.0-rc3

WT-11534 Document WT on random cursor functionality
2023-09-18 00:18:57 +00:00
Etienne Petrel
3332b64d58 Import wiredtiger: 9a1377813aaead1444ccd0f08e43783f67694374 from branch mongodb-7.1
ref: 8fc185fce4..9a1377813a
for: 7.1.0-rc3

WT-11637 Always increment background compaction failure stat when compaction does not succeed
2023-09-18 00:18:57 +00:00
Etienne Petrel
4bdfd5ea9c Import wiredtiger: 8fc185fce4e86223f14a23b5e8d6446a9174a4f1 from branch mongodb-7.1
ref: 701bb93dc3..8fc185fce4
for: 7.1.0-rc3

WT-11638 Fix assertion in prepared update resolution path
2023-09-18 00:18:57 +00:00
Etienne Petrel
df91fb07a0 Import wiredtiger: 701bb93dc32780a1fd4b497dd1b2183c0aaa5faf from branch mongodb-7.1
ref: 82e1e29635..701bb93dc3
for: 7.1.0-rc3

WT-11636 Disable google SDK tiered test
2023-09-18 00:18:57 +00:00
Etienne Petrel
8454f8df8f Import wiredtiger: 82e1e296351f5ff0578670573011274814d66127 from branch mongodb-7.1
ref: 4218cface4..82e1e29635
for: 7.1.0-rc3

WT-11010 Add testing of chunk cache to test/format
2023-09-18 00:18:57 +00:00
Etienne Petrel
5f7817f5b7 Import wiredtiger: 4218cface414ad563312f71c911c21a56833f9b9 from branch mongodb-7.1
ref: 90b4fc4b86..4218cface4
for: 7.1.0-rc3

WT-11343 Improve how the background compaction server decides when a table should be compacted
2023-09-18 00:18:57 +00:00
Etienne Petrel
e8bb2e60d1 Import wiredtiger: 90b4fc4b86e1eb19b8d155820228bf0ef4879bc8 from branch mongodb-7.1
ref: 02c2541595..90b4fc4b86
for: 7.1.0-rc3

WT-11537 Remove no-ftruncate support
2023-09-18 00:18:57 +00:00
Etienne Petrel
a68ef5214e Import wiredtiger: 02c254159513350c8c268fb78c0713d3f400fe42 from branch mongodb-7.1
ref: efa7f6d056..02c2541595
for: 7.1.0-rc3

WT-11610 Use the right type when parsing the config "block_allocation first"
2023-09-18 00:18:57 +00:00
Etienne Petrel
b8907e1b61 Import wiredtiger: efa7f6d056a6ffc4090b0316d4c82e883ea582d4 from branch mongodb-7.1
ref: 0db45ee17d..efa7f6d056
for: 7.1.0-rc3

WT-11633 Missing header in io_trace_explorer
2023-09-18 00:18:57 +00:00
Etienne Petrel
183e75f792 Import wiredtiger: 0db45ee17d2f954cb610cf08a2c2d0d305ed74aa from branch mongodb-7.1
ref: f800a0ab88..0db45ee17d
for: 7.1.0-rc3

WT-11605 Add failure config to our known failing configurations
2023-09-18 00:18:57 +00:00
Etienne Petrel
bf3b92cfa4 Import wiredtiger: f800a0ab880565973b637cadd413a4c763e59ea9 from branch mongodb-7.1
ref: 6a10646acb..f800a0ab88
for: 7.1.0-rc3

WT-11341 Chunk cache pinning documentation
2023-09-18 00:18:57 +00:00
Etienne Petrel
2524c79207 Import wiredtiger: 6a10646acbc7953c50fc3d6ebacd69e6749708b4 from branch mongodb-7.1
ref: d7b4e610bd..6a10646acb
for: 7.1.0-rc3

WT-11601 dist API script needs to "commit" changes and clang formating to config.h
2023-09-18 00:18:57 +00:00
Etienne Petrel
6f6510fde8 Import wiredtiger: d7b4e610bda24c515f4bd363634e422e855d4507 from branch mongodb-7.1
ref: 4fa18e4f6d..d7b4e610bd
for: 7.1.0-rc3

WT-11492 Fix false positive failure in test_checkpoint_snapshot05
2023-09-18 00:18:57 +00:00
Ian Boros
939758f395 SERVER-80772 Fix stage builders generating invalid plan for sort/project queries
(cherry picked from commit d4c429c622)
2023-09-15 21:38:17 +00:00
Shin Yee Tan
e22b7bd7af SERVER-80852 Exclude additional timeseries tests from tenant migration suites
(cherry picked from commit b0ac31af4a)
2023-09-15 20:57:02 +00:00
Shin Yee Tan
ae3f3c8129 SERVER-80852 Exclude timeseries tests expecting measurements in the
same bucket from tenant migration suites

(cherry picked from commit eb35a496dc)
2023-09-15 20:57:02 +00:00
Alexander Ignatyev
33323eaa74 SERVER-81095 Disable tie breaking heuristics 2023-09-15 19:04:57 +00:00
Gregory Noma
5c3d2a6466 SERVER-81032 Implement getCheckpointId for devnull engine cursor
(cherry picked from commit 5b30e7cf65)
2023-09-15 15:25:55 +00:00
Jordi Olivares Provencio
78cb4f7b65 SERVER-79960 Establish empty CappedSnapshot if not established due to concurrent collection creation 2023-09-15 14:28:58 +00:00
Austin Hartschen
c21777fa67 SERVER-80912 Update db-contrib-tool dependency. 2023-09-14 20:13:00 +00:00
Militsa Sotirova
1873da68e9 SERVER-77991 Support USER_ROLES variable in subpipelines 2023-09-14 13:53:23 +00:00
Tommaso Tocci
43a3323f56 SERVER-80491 Expose more granular metrics around balancing round
(cherry picked from commit bc47b5a4b9)
2023-09-14 10:44:01 +00:00
Jordi Olivares Provencio
a1a115c45f SERVER-81031 Remove unowned RecordStore reference in RandomCursor 2023-09-14 09:38:04 +00:00
Arun Banala
e04078defc SERVER-81013 Fix resolveCollator to return 'kNo' when query has collator and collection does not
(cherry picked from commit e51185691a060e35225bf2d1a550382ff63e0cdb)
2023-09-14 05:43:58 +00:00
Nandini Bhartiya
c4e3a20203 SERVER-81036: Fix test entry in backports_required_for_multiversion_tests.yml
(cherry picked from commit 6495c135b1ded1d46ff53b1cb2120d46e29fc37f)
2023-09-13 23:05:16 +00:00
madelinezec
118caddaeb SERVER-79794 silently catch DBException when $queryStats shapification process bloats the query's shape past the max BSON size limit 2023-09-13 20:43:04 +00:00
Erwin Pe
cb663cb4ac SERVER-79360 Fix data race on OpDebug::shouldOmitDiagnosticInformation
(cherry picked from commit 348baacb41)
2023-09-13 20:01:07 +00:00
Trevor Guidry
6759ef5796 SERVER-81004 Reduce resmoke OTEL metrics
(cherry picked from commit 07c586b330)
2023-09-12 23:36:25 +00:00
Sanika Phanse
99107139a5 SERVER-80897 Change wait function to specify timesEntered=3 2023-09-12 18:16:35 +00:00
Dan Larkin-York
39b086c4b2 Revert "SERVER-77828 Ensure expireAfterSeconds is stored as integer type on-disk"
This reverts commit 07d91ec750.
2023-09-12 14:13:38 +00:00
Frederic Vitzikam
f61a333bec SERVER-71520 Dump all thread stacks on RSTL acquisition timeout. 2023-09-12 02:38:25 +00:00
Luke Chen
46d18ff161 Import wiredtiger: 4fa18e4f6d29ed42b3328f49c50b4f389245c18b from branch mongodb-7.1
ref: ce98722516..4fa18e4f6d
for: 7.1.0-rc2

WT-11599 Update MonogDB compilation steps in many-collection-test
2023-09-11 04:46:20 +00:00
Luke Chen
78db955017 Import wiredtiger: ce9872251627ec6e0fd4a5a6664b7c469309ebd2 from branch mongodb-7.1
ref: 45f7b3f432..ce98722516
for: 7.1.0-rc2

WT-11600 Fix unused variable compilation error on mac
2023-09-11 04:46:20 +00:00
Luke Chen
b128ebef69 Import wiredtiger: 45f7b3f43244883103acf0fa336201153c02c389 from branch mongodb-7.1
ref: c1986d50cd..45f7b3f432
for: 7.1.0-rc2

WT-11598 Disable failing many-collection-test until server python changes fixed
2023-09-11 04:46:20 +00:00
Luke Chen
dc2a6edb81 Import wiredtiger: c1986d50cdd967dfc3aaef87c44e2a775709c5f4 from branch mongodb-7.1
ref: ca09c6092c..c1986d50cd
for: 7.1.0-rc2

WT-11580 Add -v/--verbose argument to the compatibility test suite runner
2023-09-11 04:46:20 +00:00
Luke Chen
d780a2c1ad Import wiredtiger: ca09c6092c0e5545c4fc57592bb3b8f1f8cdd43d from branch mongodb-7.1
ref: 0ecd6523b0..ca09c6092c
for: 7.1.0-rc2

WT-11588 Remove the table in test_compact06.py
2023-09-11 04:46:20 +00:00
Luke Chen
583d0caf94 Import wiredtiger: 0ecd6523b0da4a1ffa0e930b2b3eb57a72fcccb9 from branch mongodb-7.1
ref: 6f56d197fd..0ecd6523b0
for: 7.1.0-rc2

WT-11298 Centralize common sanitizer environment options in test/evergreen.yml
2023-09-11 04:46:20 +00:00
Luke Chen
fb29ea2866 Import wiredtiger: 6f56d197fd056d2184bcdeef79e38e06bbdb0ef4 from branch mongodb-7.1
ref: 4f933dde53..6f56d197fd
for: 7.1.0-rc2

WT-11309 Updating max size and value to be uint64_t in workgen
2023-09-11 04:46:20 +00:00
Luke Chen
517c138d90 Import wiredtiger: 4f933dde539d8f28e02f6696d817dccbdbb583e9 from branch mongodb-7.1
ref: 2d4d4bcdef..4f933dde53
for: 7.1.0-rc2

WT-11311 Address workgen issues and enable in evergreen
2023-09-11 04:46:20 +00:00
Luke Chen
6644b81eba Import wiredtiger: 2d4d4bcdef908b48b7ab07d258970d27c0b0fb36 from branch mongodb-7.1
ref: cd979cb749..2d4d4bcdef
for: 7.1.0-rc2

WT-11587 Add cppsuite run to WT hang analyzer
2023-09-11 04:46:20 +00:00
Luke Chen
9e50dc23b2 Import wiredtiger: cd979cb749c127bcca0baaeec728a2215bd360fb from branch mongodb-7.1
ref: 6deb8ed716..cd979cb749
for: 7.1.0-rc2

WT-11581 Fix no space bug for chunkcache python test
2023-09-11 04:46:20 +00:00
Luke Chen
f593271c21 Import wiredtiger: 6deb8ed716355155e37abfbfef5e095271bc717b from branch mongodb-7.1
ref: f034e4a319..6deb8ed716
for: 7.1.0-rc2

WT-11572 Remove unecessary code related to background compaction in test/format
2023-09-11 04:46:20 +00:00
Luke Chen
8fa9c9df5c Import wiredtiger: f034e4a31939199d08c34239ddfb14e8318c8ba4 from branch mongodb-7.1
ref: 25099ee2af..f034e4a319
for: 7.1.0-rc2

WT-11573 Disable background compaction when tiered storage is enabled in test/format
2023-09-11 04:46:20 +00:00
Luke Chen
0986dcf85e Import wiredtiger: 25099ee2af8c646155c6bd7d2215cdcb0fd8fc5f from branch mongodb-7.1
ref: af1c912fcf..25099ee2af
for: 7.1.0-rc2

WT-11495 Prevent LSM bulk cursors from being opened in transactions
2023-09-11 04:46:20 +00:00
Luke Chen
d829d50fec Import wiredtiger: af1c912fcf38dc014e5d2f6d499eeacf3a29cfd7 from branch mongodb-7.1
ref: efa0870b07..af1c912fcf
for: 7.1.0-rc2

WT-11575 Start different timestamp_abort iterations with different random states
2023-09-11 04:46:20 +00:00
Luke Chen
d1c401d527 Import wiredtiger: efa0870b075c0e1b6b74c4ae355af92c4421429e from branch mongodb-7.1
ref: 9989a9ee4b..efa0870b07
for: 7.1.0-rc2

WT-11574 Add convenience testutil functions for sentinel files
2023-09-11 04:46:20 +00:00
Luke Chen
ec26f27ad8 Import wiredtiger: 9989a9ee4b2e1cabec4ec1c8b927a5b295952459 from branch mongodb-7.1
ref: 5af8d7ffe4..9989a9ee4b
for: 7.1.0-rc2

WT-11499 Add "force_stop" test to timestamp_abort
2023-09-11 04:46:20 +00:00
Luke Chen
b808a2e836 Import wiredtiger: 5af8d7ffe439462df9c8c67992a1688e90995e40 from branch mongodb-7.1
ref: 1c6143bebe..5af8d7ffe4
for: 7.1.0-rc2

WT-11564 Fix RTS to read the newest_txn value only when it exists in the checkpoint
2023-09-11 04:46:20 +00:00
Luke Chen
68e09e693e Import wiredtiger: 1c6143bebe3fd946bf4547629f52bb6f9a38bcdc from branch mongodb-7.1
ref: d4cc1a0321..1c6143bebe
for: 7.1.0-rc2

WT-11339 Chunk cache pinning functional testing
2023-09-11 04:46:20 +00:00
Luke Chen
d14536ffd6 Import wiredtiger: d4cc1a0321f15ed399cea041d7e29507d4b83d7b from branch mongodb-7.1
ref: f38a8ca77f..d4cc1a0321
for: 7.1.0-rc2

WT-11101 Refactor the Python test suite and the compatibility test suite to share common code
2023-09-11 04:46:20 +00:00
Sanika Phanse
7ea97fefb5 SERVER-80430 Reduce frequency of refineShardKey state 2023-09-08 20:02:58 +00:00
Marcos José Grillo Ramirez
4ef5e930b0 SERVER-80890 Use awaitLastOpCommitted on config server to ensure sharding metadata causality in jstest
(cherry picked from commit edbb2e57fe)
2023-09-08 18:41:18 +00:00
Jordi Olivares Provencio
dad4c5cfee SERVER-79982 Take GlobalLock when cleaning up the catalog 2023-09-08 17:28:53 +00:00
Abdul Qadeer
6c9f527aa8 SERVER-79086 Make Deletion of Resharding State Document Idempotent
(cherry picked from commit c73f43f729)
2023-09-08 17:26:14 +00:00
Maria Prinus
95dcf4f945 SERVER-80740 Delete streams, streams_auth, and benchmarks_streams tests from 7.1 2023-09-08 16:45:09 +00:00
Tommaso Tocci
70708d87af SERVER-79974 Time-series bucket change stream shardCollection events translate shardKey fields
(cherry picked from commit 54db4ee730)
2023-09-08 11:37:00 +00:00
Jordi Olivares Provencio
4f3972a7d9 Revert "SERVER-79982 Take GlobalLock when cleaning up the catalog"
This reverts commit d77c09cef3.
2023-09-08 09:39:22 +00:00
Gregory Noma
f8b2d5d81c SERVER-80755 Handle null coll when resynchronizing tenant parameters
(cherry picked from commit a857fbbe97)
2023-09-07 23:23:33 +00:00
Alyssa Wagenmaker
1712b00a0c SERVER-77134 Release locks during search network requests 2023-09-07 22:04:45 +00:00
Cheahuychou Mao
b6ae2a973c SERVER-80828 Disable configure_query_analyzer_persistence.js from the sharding_csrs_continuous_config_stepdown suite
(cherry picked from commit 3a9b4df5e2)
2023-09-07 20:52:48 +00:00
Marcos José Grillo Ramirez
5628968c1d SERVER-80538 Resume migrations on error in refine collection shard key only if index validation fails
(cherry picked from commit c2a06e36d1)
2023-09-07 13:27:03 +00:00
Marcos José Grillo Ramirez
7a3d810256 SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key
(cherry picked from commit 8958c71111)
2023-09-07 11:15:14 +00:00
wenqinYe
4480abb4b7 SERVER-80530: Check if transaction is in progress before aborting it in scopeGuard in runWithTransactionsFromOpCtx() 2023-09-06 22:02:30 +00:00
Nandini Bhartiya
36239126d8 SERVER-80678: Remove feature flag for PM-2076
(cherry picked from commit a32c75d7dd579bd6837767d077abeb9b71e229d1)
2023-09-06 17:37:20 +00:00
Nandini Bhartiya
a101603600 SERVER-80678: Remove test from backports_required_for_multiversion_tests.yml
(cherry picked from commit 6cace6c5f397cdbeeb2385b24053d3391336798e)
2023-09-06 17:37:20 +00:00
Nandini Bhartiya
a83b619ece SERVER-80678: Fix feature flag version
(cherry picked from commit 0e168347de25e70f0d4d8ae833954918a5feb24a)
2023-09-06 17:37:20 +00:00
Nandini Bhartiya
49297146b4 SERVER-80678: Remove an outdated test
(cherry picked from commit a0fdd9f44ee0930ae2a735a39a6e7ad289d85385)
2023-09-06 17:37:20 +00:00
Jordi Olivares Provencio
d77c09cef3 SERVER-79982 Take GlobalLock when cleaning up the catalog 2023-09-06 16:48:45 +00:00
Alexander Neben
7bdfcad375 SERVER-79840 Removed test_packages_release from v7.1 2023-09-06 16:07:38 +00:00
Tommaso Tocci
7b1be26457 SERVER-80596 Avoid useless initial iteration in ChunkMap chunks loops
(cherry picked from commit da03e4fb0c)
2023-09-06 14:01:45 +00:00
Josef Ahmad
c90c98cb81 SERVER-77542 Handle TemporarilyUnavailable and TransactionTooLargeForCache as write conflicts for internal operations
(cherry picked from commit 2ed9c7d078)
2023-09-06 13:10:10 +00:00
Jim O'\''Leary
9893109145 SERVER-80708 use xlarge instances for compile tasks
(cherry picked from commit 6435e6f6f8)
2023-09-06 10:27:52 +00:00
Pierlauro Sciarelli
d88007ec06 Revert "SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key"
This reverts commit 1a99f32a89.
2023-09-06 08:03:05 +00:00
Jiawei Yang
cce021b8b9 SERVER-80384 disable timeseries_resume_after.js in fcv upgrade downgrade suite 2023-09-05 23:05:29 +00:00
Jiawei Yang
4784425667 SERVER-80387 change invariant to uassert on invalid resumeToken aggregate query 2023-09-05 22:24:17 +00:00
Suganthi Mani
17d52aa6ce SERVER-80717 Avoid shard merge tests in non-enterprise multiversion suite.
(cherry picked from commit c19a106e91)
2023-09-05 19:48:02 +00:00
Randolph Tan
6339743602 SERVER-80236 Move all xferMods logic to the recovery unit onCommit callback
(cherry picked from commit 1c690ead56)
2023-09-05 18:48:36 +00:00
Tommaso Tocci
fe7a23455a SERVER-80488 Avoid traversing routing table in balancer split chunk policy
(cherry picked from commit a108b54e28)
2023-09-05 15:41:05 +00:00
Marcos José Grillo Ramirez
1a99f32a89 SERVER-80715 Check collection exists before accessing it's parameters in new refine collection shard key
(cherry picked from commit 4eefd34335)
2023-09-05 14:33:53 +00:00
Antonio Fuschetto
dcce7eae35 SERVER-80712 Reconcile partitioned shard and enable consistency checks in linearizable_read_concern.js 2023-09-05 13:46:38 +00:00
Miguel Angel Nieto
59b475da3c SERVER-80710: remove the short initialsync-logkeeper
(cherry picked from commit ddf56feac6)
2023-09-05 09:36:46 +00:00
Luke Chen
b10034ac09 Import wiredtiger: f38a8ca77faa50da56c823fb72b9818eec794762 from branch mongodb-7.1
ref: 49b41234e4..f38a8ca77f
for: 7.1.0-rc1

WT-11560 Rely on stats in test_compact07 and rename test_compact09
2023-09-05 05:31:12 +00:00
Luke Chen
21bf2ad3b4 Import wiredtiger: 49b41234e48cf18f501d89150a532b5d5978d61e from branch mongodb-7.1
ref: 1cb7ee0fbd..49b41234e4
for: 7.1.0-rc1

WT-11401 test/format indicates a failure when all jobs have neither completed or failed
2023-09-05 05:31:12 +00:00
Luke Chen
62211339c8 Import wiredtiger: 1cb7ee0fbdbf95c9ad81e686df9fee245f9c7061 from branch mongodb-7.1
ref: f2c28f11f6..1cb7ee0fbd
for: 7.1.0-rc1

WT-11565 Whitespace and text fixes.
2023-09-05 05:31:12 +00:00
Luke Chen
3df6f0e641 Import wiredtiger: f2c28f11f69f48829af2b872db1754dec805efa2 from branch mongodb-7.1
ref: b65da62b36..f2c28f11f6
for: 7.1.0-rc1

WT-11557 Prevent format from running mirroring with reverse
2023-09-05 05:31:12 +00:00
Luke Chen
d356e75231 Import wiredtiger: b65da62b360fdaf2041d780aef4adef830e2b4c7 from branch mongodb-7.1
ref: cc36378925..b65da62b36
for: 7.1.0-rc1

WT-11563 Correct FIXME ticket numbers for tiered support.
2023-09-05 05:31:12 +00:00
Luke Chen
35534c8c9b Import wiredtiger: cc363789258866a3973ede345b409291389549ae from branch mongodb-7.1
ref: f88a0f3aa1..cc36378925
for: 7.1.0-rc1

WT-11554 Generate comments for log_auto.c
2023-09-05 05:31:12 +00:00
Luke Chen
374a892b48 Import wiredtiger: f88a0f3aa1a9fd76027185e02548e0f89d7d4334 from branch mongodb-7.1
ref: 292853df0a..f88a0f3aa1
for: 7.1.0-rc1

WT-10823 Skip applying functions to tiered objects.
2023-09-05 05:31:12 +00:00
Luke Chen
5e492626cb Import wiredtiger: 292853df0a20dd28ef07c32d07885fd2461185d6 from branch mongodb-7.1
ref: e0a5835543..292853df0a
for: 7.1.0-rc1

WT-7775 Remove objectid args where possible.
2023-09-05 05:31:11 +00:00
Luke Chen
a59697cc19 Import wiredtiger: e0a58355432593f00df9ba1acf05167adedc5b27 from branch mongodb-7.1
ref: e94ddb2977..e0a5835543
for: 7.1.0-rc1

WT-10807 Evict the pages that have all deleted items
2023-09-05 05:31:11 +00:00
Sanika Phanse
7d04ba9dbd SERVER-80497 Add failpoint to prevent range deletion from completing before index is dropped 2023-09-01 22:21:03 +00:00
Suganthi Mani
75b289f693 SERVER-80695 Tenant file Importer service sets the historicalIDTrackerAllowsMixedModeWrites decoration as true.
(cherry picked from commit 35812ea89b)
2023-09-01 20:42:59 +00:00
dylrich
85768672a6 SERVER-80655: reduce logging in release tasks 2023-09-01 19:05:53 +00:00
Suganthi Mani
33a77b2ebc SERVER-57896 tenant_migration_donor_startup_recovery.js fix
(cherry picked from commit c8a4ce5e07)
2023-09-01 18:24:18 +00:00
Suganthi Mani
b9011c8dba SERVER-57896 Enable Feature flag for Shard Merge.
(cherry picked from commit 42526bc108)
2023-09-01 18:24:18 +00:00
Jim O'\''Leary
054deb01d1 SERVER-79835 Update the FCV constant in the logkeeper snapshot workload for 7.1
(cherry picked from commit e85d0e91eb)
2023-09-01 08:48:22 +00:00
Suganthi Mani
efcb687118 SERVER-79969 serverless_reject_multiple_ops_split.js test failure fix.
(cherry picked from commit 800ffff1f2)
2023-08-31 21:07:46 +00:00
Suganthi Mani
0567c351eb SERVER-74585 tenant_migration_donor_cmd_response.js fix.
(cherry picked from commit bd1e7e7d9c)
2023-08-31 21:07:46 +00:00
Suganthi Mani
5267a8ccd2 SERVER-74585 Ensure shard Merge recipient aborts correctly on rollbacks and restarts.
(cherry picked from commit 5b43629c69)
2023-08-31 21:07:46 +00:00
Yuhong Zhang
a572a4c8c9 SERVER-79912 Set checkExistenceForDiffInsert to true for oplog entry generated from $_internalApplyOplogUpdate update
(cherry picked from commit 806f6d42ee)
2023-08-31 16:57:04 +00:00
Yuhong Zhang
0151b5403c SERVER-79912 Introduce checkExistenceForDiffInsert field to oplog
(cherry picked from commit 923f5a7bf7)
2023-08-31 16:57:04 +00:00
Yuhong Zhang
4ae0bfda16 SERVER-80222 Disable featureFlagTimeseriesUpdatesSupport feature flag 2023-08-31 15:43:29 +00:00
Jiawei Yang
62526599c0 SERVER-80408 Only check feature flag at the beginning of resharding cloning 2023-08-30 19:53:13 +00:00
Marcos José Grillo Ramirez
dae42999b5 SERVER-80438 Move the resume migrations of the new refine collection shard key to its own phase
(cherry picked from commit 7063a3ca32)
2023-08-30 12:19:14 +00:00
Gregory Wlodarek
8bcce4a3f6 SERVER-80500 Tag incompatible time-series tests with tenant_migration_incompatible and fix compressed bucket data fields
(cherry picked from commit 6d13d228f3)
2023-08-30 03:03:13 +00:00
Mikhail Shchatko
9238c05d06 SERVER-79834 Update path to evergreen config file in resmoke 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
3dfc0a28b9 SERVER-79834 Fix burn_in_gen 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
d2772021cc SERVER-79834 Enable classic engine variants in etc/evergreen_nightly.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
6b642a58fc SERVER-79834 Copy required variants to etc/evergreen_nightly.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
4aece1b1b6 SERVER-79834 Remove future git tag and wtdevelop compile variants from etc/evergreen_yml_components/variants/compile_static_analysis.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
35874e7718 SERVER-79834 Remove the FCV sys-perf variants from etc/system_perf.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
c93160a001 SERVER-79834 Remove all feature flags variants from etc/system_perf.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
a95a63d1db SERVER-79834 Remove renew_ssl_cert from etc/system_perf.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
67d150dca6 SERVER-79834 Change enterprise module branch name from "master" to "v7.1" in etc/system_perf.yml 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
6aab435a60 SERVER-79834 Update filename suffixes in buildscripts/generate_version_expansions.py from "latest" to "v7.1-latest" 2023-08-29 17:49:25 +00:00
Mikhail Shchatko
d0488cf675 SERVER-79834 Change references from "master" to "v7.1" in etc/evergreen_yml_components/definitions.yml 2023-08-29 17:49:24 +00:00
765 changed files with 15655 additions and 9949 deletions

View File

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

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.1-latest"
expansions["src_suffix"] = "v7.1-latest"
expansions["is_release"] = "false"
else:
expansions["suffix"] = version_line

View File

@ -56,8 +56,6 @@ selector:
- build/install/bin/sbe_expression_bm*
# These benchmarks are being run as part of the benchmarks_abt.yml test suite.
- 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*
# 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

@ -58,8 +58,6 @@ selector:
- build/install/bin/sbe_expression_bm*
# These benchmarks are being run as part of the benchmarks_abt.yml test suite.
- 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*
# 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

@ -86,9 +86,6 @@ selector:
# Time-series collections are not supported on mongos.
- jstests/concurrency/fsm_workloads/create_timeseries_collection.js
# TODO Undenylist (SERVER-71819).
- jstests/concurrency/fsm_workloads/schema_validator_with_expr_variables.js
exclude_with_any_tags:
- does_not_support_causal_consistency
# This suite uses secondary read preference, which isn't currently compatible with transactions.

View File

@ -99,9 +99,6 @@ selector:
# infrastructure. See SERVER-77039 for full details.
- jstests/concurrency/fsm_workloads/map_reduce_drop.js
# TODO Undenylist (SERVER-71819).
- jstests/concurrency/fsm_workloads/schema_validator_with_expr_variables.js
exclude_with_any_tags:
- assumes_balancer_off
- requires_replication

View File

@ -95,9 +95,6 @@ selector:
# Time-series collections are not supported on mongos.
- jstests/concurrency/fsm_workloads/create_timeseries_collection.js
# TODO Undenylist (SERVER-71819).
- jstests/concurrency/fsm_workloads/schema_validator_with_expr_variables.js
exclude_with_any_tags:
- assumes_balancer_off
- requires_replication

View File

@ -22,6 +22,8 @@ selector:
- uses_transactions
# Exclude tests with the latest fcv.
- requires_fcv_71
# Exclude tests that are not compatible with upgrade/downgrade.
- cannot_run_during_upgrade_downgrade
exclude_files:
# The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
@ -63,11 +65,6 @@ selector:
- src/mongo/db/modules/*/jstests/fle/fle_use_cases.js
- src/mongo/db/modules/*/jstests/fle/fle_drivers_integration.js
# The test uses a resumeToken from previous calls so FCV change will make the token invalid and fail.
- jstests/core/resume_query_from_non_existent_record.js
- jstests/core/resume_query.js
- jstests/core/find_with_resume_after_param.js
# Expected failure due to command count being not precise due to potential retry of index build.
- jstests/core/operation_latency_histogram.js

View File

@ -101,11 +101,6 @@ selector:
- src/mongo/db/modules/*/jstests/fle/fle_use_cases.js
- src/mongo/db/modules/*/jstests/fle/fle_drivers_integration.js
# The test uses a resumeToken from previous calls so FCV change will make the token invalid and fail.
- jstests/core/resume_query_from_non_existent_record.js
- jstests/core/resume_query.js
- jstests/core/find_with_resume_after_param.js
# Expected failure due to command count being not precise due to potential retry of index build.
- jstests/core/operation_latency_histogram.js
@ -172,6 +167,8 @@ selector:
- uses_transactions
# Exclude tests with the latest fcv.
- requires_fcv_71
# Exclude tests that are not compatible with upgrade/downgrade.
- cannot_run_during_upgrade_downgrade
executor:
archive:

View File

@ -71,11 +71,6 @@ selector:
- src/mongo/db/modules/*/jstests/fle/fle_use_cases.js
- src/mongo/db/modules/*/jstests/fle/fle_drivers_integration.js
# The test uses a resumeToken from previous calls so FCV change will make the token invalid and fail.
- jstests/core/resume_query_from_non_existent_record.js
- jstests/core/resume_query.js
- jstests/core/find_with_resume_after_param.js
# Expected failure due to command count being not precise due to potential retry of index build.
- jstests/core/operation_latency_histogram.js
@ -126,6 +121,8 @@ selector:
- uses_transactions
# Exclude tests with the latest fcv.
- requires_fcv_71
# Exclude tests that are not compatible with upgrade/downgrade.
- cannot_run_during_upgrade_downgrade
executor:
archive:

View File

@ -19,9 +19,6 @@ selector:
- jstests/replsets/emptycapped.js
- jstests/replsets/localhostAuthBypass.js
- jstests/replsets/rollback_auth.js
- jstests/replsets/tenant_migration_concurrent_writes_on_donor.js
- jstests/replsets/tenant_migration_external_cluster_validation.js
- jstests/replsets/tenant_migration_recipient_shard_merge_copies_change_collections.js
- jstests/replsets/user_management_wc.js
- jstests/replsets/replsetinitiate_works_with_keyfile_profile_verbose_options.js
# Also skip tests that require a Thread, because Threads don't inherit credentials.

View File

@ -0,0 +1,17 @@
test_kind: js_test
selector:
roots:
- jstests/serverless/tenant_migration*.js
exclude_with_any_tags:
- requires_shard_merge
executor:
config:
shell_options:
nodb: ''
global_vars:
TestData:
hashTestNamesForMultitenancy: true
setParameters:
featureFlagShardMerge: false

View File

@ -286,7 +286,7 @@ executor:
# Tests in this suite only read from primaries and only one node is electable, so causal
# consistency is not required to read your own writes.
causalConsistency: false
# TODO SERVER-68643 No longer needed when we only use shard merge protocol.
# TODO SERVER-63517 No longer needed when we only use shard merge protocol.
useLocalDBForDBCheck: true
# Shard Merge does not support fastcount. When we call CheckTenantMigrationDBHash after
# each migration we would potentially fail when enforcing using the fast count during that
@ -332,7 +332,6 @@ executor:
# only runs donorForgetMigration against the donor of each migration when it is safe to do
# so. Therefore, the garbage collection delay doesn't need to be large.
tenantMigrationGarbageCollectionDelayMS: 1
ttlMonitorSleepSecs: 1
minSnapshotHistoryWindowInSeconds: 30
tlsMode: allowTLS
tlsCAFile: jstests/libs/ca.pem

View File

@ -65,7 +65,7 @@ executor:
keyFile: *keyFile
keyFileData: *keyFileData
roleGraphInvalidationIsFatal: true
# TODO SERVER-68643 No longer needed when we only use shard merge protocol.
# TODO SERVER-63517 No longer needed when we only use shard merge protocol.
useLocalDBForDBCheck: true
# Shard Merge does not support fastcount. When we call CheckTenantMigrationDBHash after
# each migration we would potentially fail when enforcing using the fast count during that
@ -111,7 +111,6 @@ executor:
# only runs donorForgetMigration against the donor of each migration when it is safe to do
# so. Therefore, the garbage collection delay doesn't need to be large.
tenantMigrationGarbageCollectionDelayMS: 1
ttlMonitorSleepSecs: 1
minSnapshotHistoryWindowInSeconds: 30
tlsMode: allowTLS
tlsCAFile: jstests/libs/ca.pem

View File

@ -280,9 +280,12 @@ executor:
keyFile: *keyFile
keyFileData: *keyFileData
roleGraphInvalidationIsFatal: true
# TODO SERVER-68643 No longer needed when we only use shard merge protocol.
skipEnforceFastCountOnValidate: true
# TODO SERVER-63517 No longer needed when we only use shard merge protocol.
useLocalDBForDBCheck: true
# Shard Merge does not support fastcount. When we call CheckTenantMigrationDBHash after
# each migration we would potentially fail when enforcing using the fast count during that
# process.
skipEnforceFastCountOnValidate: true
networkErrorAndTxnOverrideConfig:
wrapCRUDinTransactions: true
sessionOptions:
@ -329,7 +332,6 @@ executor:
# only runs donorForgetMigration against the donor of each migration when it is safe to do
# so. Therefore, the garbage collection delay doesn't need to be large.
tenantMigrationGarbageCollectionDelayMS: 1
ttlMonitorSleepSecs: 1
minSnapshotHistoryWindowInSeconds: 30
tlsMode: allowTLS
tlsCAFile: jstests/libs/ca.pem

View File

@ -248,6 +248,9 @@ selector:
# Test runs command on a config shard and does not shutdown safely upon transitioning to a dedicated config server.
- jstests/sharding/fsync_lock_unlock.js
# Expect the configureQueryAnalyzer command to execute without config server stepdown.
- jstests/sharding/analyze_shard_key/configure_query_analyzer_persistence.js
exclude_with_any_tags:
- does_not_support_stepdowns

View File

@ -0,0 +1,23 @@
test_kind: js_test
# Similar to the `ssl` suite, but configured by evergreen to run sequentially, so that the
# contents of the Windows system certificate store are only affected by one test at a time.
selector:
roots:
- jstests/ssl_linear/*.js
# ssl tests start their own mongod's.
executor:
config:
shell_options:
nodb: ''
ssl: ''
sslAllowInvalidCertificates: ''
sslCAFile: jstests/libs/ca.pem
sslPEMKeyFile: jstests/libs/client.pem
global_vars:
TestData:
setParameters:
logComponentVerbosity: "{network:2}"
setParametersMongos:
logComponentVerbosity: "{network:2}"

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,
@ -621,7 +622,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

@ -318,6 +318,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

@ -183,7 +183,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]):
@ -271,7 +272,7 @@ class TestRunner(Subcommand):
print("Skipping local invocation because evergreen task id was not provided.")
return
evg_conf = parse_evergreen_file("etc/evergreen.yml")
evg_conf = parse_evergreen_file("etc/evergreen_nightly.yml")
suite = self._get_suites()[0]
suite_name = config.ORIGIN_SUITE or suite.get_name()
@ -1066,6 +1067,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

@ -19,6 +19,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 #
########################
@ -228,6 +230,13 @@ class _TestList(object):
format(path)))
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.
@ -467,6 +476,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, force=True)
# 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())
@ -482,6 +494,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

@ -13,6 +13,13 @@ class CheckMetadataConsistencyInBackground(jsfile.DataConsistencyHook):
IS_BACKGROUND = True
# The 'CheckMetadataConsistency' hook relies on the 'isMaster' command to asses if the fixture cluster is sharded.
# Skip tests that set a failPoint to make the 'isMaster' command unconditionally fail.
SKIP_TESTS = [
"build/install/bin/executor_integration_test", "build/install/bin/rpc_integration_test",
"build/install/bin/transport_integration_test"
]
def __init__(self, hook_logger, fixture, shell_options=None):
"""Initialize CheckMetadataConsistencyInBackground."""
@ -67,6 +74,10 @@ class CheckMetadataConsistencyInBackground(jsfile.DataConsistencyHook):
test.logger, test, self, self._js_filename, shell_options)
hook_test_case.configure(self.fixture)
if test.test_name in self.SKIP_TESTS:
self.logger.info("Metadata consistency check explicitely disabled for {test.test_name}")
return
self.logger.info("Resuming background metadata consistency checker thread")
self._background_job.resume(hook_test_case, test_report)
@ -78,6 +89,9 @@ class CheckMetadataConsistencyInBackground(jsfile.DataConsistencyHook):
if self._background_job is None:
return
if test.test_name in self.SKIP_TESTS:
return
self.logger.info("Pausing background metadata consistency checker thread")
self._background_job.pause()

View File

@ -225,7 +225,6 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
WAIT_SECS_RANGES = [[0.05, 0.1], [0.1, 0.5], [1, 5], [5, 15]]
POLL_INTERVAL_SECS = 0.1
WAIT_PENDING_IDENT_SECS = 0.3
NO_SUCH_MIGRATION_ERR_CODE = 327
INTERNAL_ERR_CODE = 1
@ -356,7 +355,7 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
def _is_fail_point_abort_reason(self, abort_reason):
return abort_reason["code"] == self.INTERNAL_ERR_CODE and abort_reason[
"errmsg"] == "simulate a shard merge error"
"errmsg"] == "simulate a tenant migration error"
def _create_migration_opts(self, donor_rs_index, recipient_rs_index):
donor_rs = self._shard_merge_fixture.get_replset(donor_rs_index)
@ -434,27 +433,6 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
migration_opts.migration_id, migration_opts.get_donor_name())
raise
def _override_abort_failpoint_shard_merge(self, donor_primary): # noqa: D205,D400
"""Override the abortTenantMigrationBeforeLeavingBlockingState failpoint so the shard merge
does not abort since it is currently not supported. Only use this method for shard merge.
"""
while True:
try:
donor_primary_client = self._create_client(donor_primary)
donor_primary_client.admin.command(
bson.SON([("configureFailPoint",
"pauseTenantMigrationBeforeLeavingBlockingState"), ("mode", "off")]))
donor_primary_client.admin.command(
bson.SON([("configureFailPoint",
"abortTenantMigrationBeforeLeavingBlockingState"), ("mode", "off")]))
return
except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError):
self.logger.info(
"Retrying connection to donor primary in order to disable abort failpoint for shard merge."
)
continue
time.sleep(self.POLL_INTERVAL_SECS)
def _start_and_wait_for_migration(self, migration_opts): # noqa: D205,D400
"""Run donorStartMigration to start a shard merge based on 'migration_opts', wait for
the migration decision and return the last response for donorStartMigration.
@ -469,18 +447,6 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
}
donor_primary = migration_opts.get_donor_primary()
# TODO(SERVER-68643) We no longer need to override the failpoint once milestone 3 is done
# for shard merge.
self._override_abort_failpoint_shard_merge(donor_primary)
# For shard merge protocol we need to wait for the ident to be removed before starting a
# new migration with a shard merge otherwise, due to the two phase drop, the stored
# files will be marked to be deleted but not deleted fast enough and we would end up
# moving a file that still exists.
while self._get_pending_drop_idents(migration_opts.recipient_rs_index) > 0:
time.sleep(self.WAIT_PENDING_IDENT_SECS)
# Some tests also do drops on collection which we need to wait on before doing a new migration
while self._get_pending_drop_idents(migration_opts.donor_rs_index) > 0:
time.sleep(self.WAIT_PENDING_IDENT_SECS)
self.logger.info(
"Starting shard merge '%s' on donor primary on port %d of replica set '%s'.",
@ -697,30 +663,3 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
" port %d of replica set '%s' to be garbage collection.", str(self._tenant_ids),
primary.port, rs.replset_name)
raise
def _get_pending_drop_idents(self, replica_set_index): # noqa: D205,D400
"""Returns the number of pending idents to be dropped. This is necessary for the shard
merge protocol since we need to wait for the idents to be dropped before starting a new
shard merge.
"""
primary = self._shard_merge_fixture.get_replset(replica_set_index).get_primary()
pending_drop_idents = None
while True:
try:
client = self._create_client(primary)
server_status = client.admin.command({"serverStatus": 1})
pending_drop_idents = server_status["storageEngine"]["dropPendingIdents"]
break
except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError,
pymongo.errors.WriteConcernError) as err:
self.logger.info(
"Retrying getting dropPendingIdents against primary on port %d after error %s.",
primary.port, str(err))
continue
except pymongo.errors.PyMongoError:
self.logger.exception(
"Error creating client waiting for pending drop idents on " +
" primary on port %d.", primary.port)
raise
return pending_drop_idents

View File

@ -298,36 +298,30 @@ class Job(object):
run_hooks_after_suite_span.set_status(
StatusCode.ERROR if hooks_failed else StatusCode.OK)
@TRACER.start_as_current_span("job._run_hooks_before_tests")
def _run_hooks_before_tests(self, test: TestCase, hook_failure_flag: Optional[threading.Event]):
"""Run the before_test method on each of the hooks.
Swallows any TestFailure exceptions if set to continue on
failure, and reraises any other exceptions.
"""
run_hooks_before_tests_span = trace.get_current_span()
run_hooks_before_tests_span.set_attributes(attributes=test.get_test_otel_attributes())
try:
for hook in self.hooks:
self._run_hook(hook, hook.before_test, test, hook_failure_flag)
except errors.StopExecution:
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
raise
except errors.ServerFailure:
self.logger.exception("%s marked as a failure by a hook's before_test.",
test.short_description())
self._fail_test(test, sys.exc_info(), return_code=2)
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
raise errors.StopExecution("A hook's before_test failed")
except errors.TestFailure:
self.logger.exception("%s marked as a failure by a hook's before_test.",
test.short_description())
self._fail_test(test, sys.exc_info(), return_code=1)
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
if self.suite_options.fail_fast:
raise errors.StopExecution("A hook's before_test failed")
@ -336,12 +330,8 @@ class Job(object):
self.report.startTest(test)
self.report.addError(test, sys.exc_info())
self.report.stopTest(test)
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
raise
run_hooks_before_tests_span.set_status(StatusCode.OK)
@TRACER.start_as_current_span("job._run_hooks_after_tests")
def _run_hooks_after_tests(self, test: TestCase, hook_failure_flag: Optional[threading.Event],
background: bool = False):
"""Run the after_test method on each of the hooks.
@ -353,10 +343,6 @@ class Job(object):
@param background: whether to run background hooks.
"""
run_hooks_after_tests_span = trace.get_current_span()
run_hooks_after_tests_span.set_attributes(attributes=test.get_test_otel_attributes())
run_hooks_after_tests_span.set_attribute(TestCase.METRIC_NAMES.BACKGROUND, background)
suite_with_balancer = isinstance(
self.fixture, shardedcluster.ShardedClusterFixture) and self.fixture.enable_balancer
@ -368,7 +354,6 @@ class Job(object):
self.logger.exception("%s failed while stopping the balancer for end-test hooks",
test.short_description())
self.report.setFailure(test, return_code=2)
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
if self.archival:
result = TestResult(test=test, hook=None, success=False)
self.archival.archive(self.logger, result, self.manager)
@ -380,27 +365,23 @@ class Job(object):
self._run_hook(hook, hook.after_test, test, hook_failure_flag)
except errors.StopExecution:
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
raise
except errors.ServerFailure:
self.logger.exception("%s marked as a failure by a hook's after_test.",
test.short_description())
self.report.setFailure(test, return_code=2)
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
raise errors.StopExecution("A hook's after_test failed")
except errors.TestFailure:
self.logger.exception("%s marked as a failure by a hook's after_test.",
test.short_description())
self.report.setFailure(test, return_code=1)
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
if self.suite_options.fail_fast:
raise errors.StopExecution("A hook's after_test failed")
except:
self.report.setError(test, sys.exc_info())
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
raise
if not background and suite_with_balancer:
@ -412,7 +393,6 @@ class Job(object):
"%s failed while re-starting the balancer after end-test hooks",
test.short_description())
self.report.setFailure(test, return_code=2)
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
if self.archival:
result = TestResult(test=test, hook=None, success=False)
self.archival.archive(self.logger, result, self.manager)

View File

@ -0,0 +1,87 @@
import subprocess
import os
import sys
def run_command(command): # noqa: D406
"""
Execute a shell command and return its standard output (`stdout`).
Args:
command (str): The shell command to be executed.
Returns:
str: The standard output of the executed command.
Raises:
subprocess.CalledProcessError: If the command execution fails.
"""
try:
return subprocess.run(command, shell=True, check=True, text=True,
capture_output=True).stdout
except subprocess.CalledProcessError as e:
print(f"Error while executing: '{command}'.\n{e}\nStandard Error: {e.stderr}")
raise
def create_mongodb_bot_gitconfig():
"""Create the mongodb-bot.gitconfig file with the desired content."""
content = """
[user]
name = MongoDB Bot
email = mongo-bot@mongodb.com
"""
gitconfig_path = os.path.expanduser("~/mongodb-bot.gitconfig")
with open(gitconfig_path, 'w') as file:
file.write(content)
print("mongodb-bot.gitconfig file created.")
def main():
# Check if the copybara directory already exists
if os.path.exists('copybara'):
print("Copybara directory already exists.")
else:
run_command("git clone https://github.com/10gen/copybara.git")
# Navigate to the Copybara directory and build the Copybara Docker image
run_command("cd copybara && docker build --rm -t copybara .")
# Create the mongodb-bot.gitconfig file as necessary.
create_mongodb_bot_gitconfig()
# Set up the Docker command and execute it
current_dir = os.getcwd()
docker_cmd = [
"docker run", "-v ~/.ssh:/root/.ssh", "-v ~/mongodb-bot.gitconfig:/root/.gitconfig",
f'-v "{current_dir}/copybara.staging.sky":/usr/src/app/copy.bara.sky',
"-e COPYBARA_CONFIG='copy.bara.sky'", "-e COPYBARA_SUBCOMMAND='migrate'",
"-e COPYBARA_OPTIONS='-v'", "copybara copybara"
]
try:
run_command(" ".join(docker_cmd))
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__":
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."""
@ -119,7 +122,7 @@ 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 = [
COMMON_PUBLIC_PATTERNS = [
re.compile(
new_patch_description(COMMON_PUBLIC_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE,
@ -128,6 +131,10 @@ VALID_PATTERNS = [
old_patch_description(COMMON_PUBLIC_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE,
),
]
"""common public patterns."""
VALID_PATTERNS = [
re.compile(
new_patch_description(COMMON_LINT_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE,
@ -164,6 +171,12 @@ PRIVATE_PATTERNS = [
old_patch_description(COMMON_PRIVATE_PATTERN),
re.MULTILINE | re.DOTALL | re.VERBOSE,
),
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),
]
"""private patterns."""
@ -205,18 +218,22 @@ class CommitMessageValidationOrchestrator:
:param project: Project commit is targeting.
:return: True if the message is valid.
"""
for pattern in COMMON_PUBLIC_PATTERNS:
match = pattern.match(message)
if not match:
continue
if not self.validate_ticket(match.group("ticket"), project):
print(
ERROR_MSG.format(
error_msg="Reference to a internal Jira Ticket",
branch=project,
commit_message=message,
))
return False
return True
valid_matches = [valid_pattern.match(message) for valid_pattern in VALID_PATTERNS]
if any(valid_matches):
ticket_matches = [pattern.match(message) for pattern in VALID_PATTERNS[0:2]]
for match in [ticket_match for ticket_match in ticket_matches if ticket_match]:
if not self.validate_ticket(match.group("ticket"), project):
print(
ERROR_MSG.format(
error_msg="Reference to a internal Jira Ticket",
branch=project,
commit_message=message,
))
return False
return True
elif any(private_pattern.match(message) for private_pattern in PRIVATE_PATTERNS):
print(

28
copybara.staging.sky Normal file
View File

@ -0,0 +1,28 @@
# 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 = "v7.1",
# VersionSelector
),
destination = git.destination(
url = destinationUrl,
fetch = "v7.1",
push = "v7.1",
),
# 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

@ -23,7 +23,7 @@ tests][fail_point_test].
## Configuring and Waiting on Fail Points
Fail point configuration involves chosing a "mode" for activation (e.g., "alwaysOn") and optionally
Fail point configuration involves choosing a "mode" for activation (e.g., "alwaysOn") and optionally
providing additional data in the form of a BSON object. For the vast majority of cases, this is done
by issuing a `configureFailPoint` command request. This is made easier in JavaScript using the
`configureFailPoint` helper from [fail_point_util.js][fail_point_util]. Fail points can also be

View File

@ -268,7 +268,7 @@ last-continuous:
- test_file: jstests/sharding/resharding_temp_ns_routing_info_unsharded.js
ticket: SERVER-68628
- test_file: jstests/sharding/move_chunk_concurrent_cloning.js
ticket: SERVER-68648
ticket: SERVER-81201
- test_file: jstests/sharding/move_chunk_interrupt_postimage.js
ticket: SERVER-68728
- test_file: jstests/sharding/resharding_critical_section_metrics.js
@ -385,14 +385,10 @@ last-continuous:
ticket: SERVER-77386
- test_file: jstests/core/timeseries/timeseries_resume_after.js
ticket: SERVER-77386
- test_file: jstests/sharding/query/sharded_graph_lookup_execution.js
ticket: SERVER-77427
- 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
- test_file: jstests/sharding/fsync_lock_unlock.js
ticket: SERVER-78149
ticket: SERVER-73685
- test_file: jstests/sharding/fsync_lock_ddl_lock.js
ticket: SERVER-78157
- test_file: jstests/sharding/fsync_lock_fails_with_in_progress_ddl_op.js
@ -403,6 +399,8 @@ last-continuous:
ticket: SERVER-78187
- test_file: jstests/core/query/elemmatch/elemmatch_ne.js
ticket: SERVER-78260
- test_file: jstests/core/timeseries/timeseries_buckets_oplog_update.js
ticket: SERVER-79912
- test_file: jstests/sharding/analyze_shard_key/timeseries.js
ticket: SERVER-78595
- test_file: jstests/change_streams/oplog_rewrite/change_stream_nor_rewrite.js
@ -419,10 +417,28 @@ last-continuous:
ticket: SERVER-79136
- test_file: jstests/sharding/reset_placement_history_snapshot_read.js
ticket: SERVER-79357
- test_file: jstests/sharding/index_and_collection_option_propagation.js
ticket: SERVER-71819
- test_file: jstests/replsets/tenant_migration_recreate_timeseries_collection.js
ticket: SERVER-80301
- test_file: jstests/replsets/stepdown_fassert_on_rstl_timeout.js
ticket: SERVER-71520
- test_file: jstests/core/timeseries/nondefault_collation.js
ticket: SERVER-81013
- test_file: jstests/core/timeseries/timeseries_delete_collation.js
ticket: SERVER-81013
- test_file: jstests/core/timeseries/timeseries_update_collation.js
ticket: SERVER-81013
- test_file: jstests/sharding/analyze_shard_key/ns_validation.js
ticket: SERVER-81939
- test_file: jstests/sharding/timeseries_insert_targeting_normalize_metadata.js
ticket: SERVER-80203
- test_file: jstests/sharding/flushRoutingTableCacheUpdates_enforced_on_collections.js
ticket: SERVER-81985
- test_file: jstests/sharding/move_chunk_basic.js
ticket: SERVER-81201
- test_file: jstests/sharding/block_chunk_migrations_without_hashed_shard_key_index.js
ticket: SERVER-78530
- test_file: jstests/sharding/delete_range_deletion_tasks_on_dropped_hashed_shard_key_index.js
ticket: SERVER-78530
suites: null
last-lts:
all:
@ -737,7 +753,7 @@ last-lts:
- test_file: jstests/sharding/resharding_temp_ns_routing_info_unsharded.js
ticket: SERVER-68628
- test_file: jstests/sharding/move_chunk_concurrent_cloning.js
ticket: SERVER-68648
ticket: SERVER-81201
- test_file: jstests/sharding/move_chunk_interrupt_postimage.js
ticket: SERVER-68728
- test_file: jstests/replsets/tenant_migration_recipient_forget_migration.js
@ -864,14 +880,10 @@ last-lts:
ticket: SERVER-77386
- test_file: jstests/core/timeseries/timeseries_resume_after.js
ticket: SERVER-77386
- test_file: jstests/sharding/query/sharded_graph_lookup_execution.js
ticket: SERVER-77427
- 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
- test_file: jstests/sharding/fsync_lock_unlock.js
ticket: SERVER-78149
ticket: SERVER-73685
- test_file: jstests/sharding/fsync_lock_ddl_lock.js
ticket: SERVER-78157
- test_file: jstests/sharding/fsync_lock_fails_with_in_progress_ddl_op.js
@ -906,10 +918,30 @@ last-lts:
ticket: SERVER-79136
- test_file: jstests/sharding/reset_placement_history_snapshot_read.js
ticket: SERVER-79357
- test_file: jstests/sharding/index_and_collection_option_propagation.js
ticket: SERVER-71819
- test_file: jstests/replsets/dbcheck_dropped_collection.js
ticket: SERVER-79490
- test_file: jstests/replsets/tenant_migration_recreate_timeseries_collection.js
ticket: SERVER-80301
- test_file: jstests/replsets/stepdown_fassert_on_rstl_timeout.js
ticket: SERVER-71520
- test_file: jstests/core/timeseries/timeseries_buckets_oplog_update.js
ticket: SERVER-79912
- test_file: jstests/core/timeseries/nondefault_collation.js
ticket: SERVER-81013
- test_file: jstests/core/timeseries/timeseries_delete_collation.js
ticket: SERVER-81013
- test_file: jstests/core/timeseries/timeseries_update_collation.js
ticket: SERVER-81013
- test_file: jstests/sharding/analyze_shard_key/ns_validation.js
ticket: SERVER-81939
- test_file: jstests/sharding/timeseries_insert_targeting_normalize_metadata.js
ticket: SERVER-80203
- test_file: jstests/sharding/flushRoutingTableCacheUpdates_enforced_on_collections.js
ticket: SERVER-81985
- test_file: jstests/sharding/move_chunk_basic.js
ticket: SERVER-81201
- test_file: jstests/sharding/block_chunk_migrations_without_hashed_shard_key_index.js
ticket: SERVER-78530
- test_file: jstests/sharding/delete_range_deletion_tasks_on_dropped_hashed_shard_key_index.js
ticket: SERVER-78530
suites: null

View File

@ -695,7 +695,6 @@ buildvariants:
test_flags: >-
--runAllFeatureFlagTests
--excludeWithAnyTags=incompatible_with_windows_tls
--excludeWithAnyTags=incompatible_with_shard_merge
external_auth_jobs_max: 1
# Uncomment expansion and `burn_in_tasks_gen` task below and add resmoke task name to burn-in.
# WARNING! Task splitting is not supported for burn-in tasks. Large unsplitted `_gen` tasks may
@ -1167,8 +1166,6 @@ buildvariants:
- name: server_selection_json_test_TG
distros:
- rhel80-xlarge
- name: streams
- name: streams_auth
- name: vector_search
- name: vector_search_auth
- name: vector_search_ssl
@ -1190,7 +1187,6 @@ buildvariants:
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
test_flags: >-
--runAllFeatureFlagTests
--excludeWithAnyTags=incompatible_with_shard_merge
# Uncomment expansion and `burn_in_tasks_gen` task below and add resmoke task name to burn-in.
# WARNING! Task splitting is not supported for burn-in tasks. Large unsplitted `_gen` tasks may
# run too long and hit execution timeouts.
@ -1313,9 +1309,6 @@ buildvariants:
- name: .updatefuzzer
- name: secondary_reads_passthrough_gen
- name: .shard_split
- name: .shard_merge
- name: streams
- name: streams_auth
- name: vector_search
- name: vector_search_auth
- name: vector_search_ssl
@ -1458,7 +1451,6 @@ buildvariants:
<<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-expansions
test_flags: >-
--runAllFeatureFlagTests
--excludeWithAnyTags=incompatible_with_shard_merge
--excludeWithAnyTags=cqf_incompatible
--mongosSetParameters="{featureFlagCommonQueryFramework: true, internalQueryFrameworkControl: 'tryBonsai'}"
--mongodSetParameters="{featureFlagCommonQueryFramework: true, internalQueryFrameworkControl: 'tryBonsai'}"
@ -1563,9 +1555,6 @@ buildvariants:
- name: .updatefuzzer
- name: secondary_reads_passthrough_gen
- name: .shard_split
- name: .shard_merge
- name: streams
- name: streams_auth
- name: query_stats_passthrough
- name: query_stats_passthrough_writeonly
- name: query_stats_mongos_passthrough
@ -1658,7 +1647,6 @@ buildvariants:
# No feature flag tests since they aren't compatible with the older binaries.
test_flags: >-
--runNoFeatureFlagTests
--excludeWithAnyTags=incompatible_with_shard_merge,
# This variant exists becuase this is the only way to test future multiversion tags
# version_expansions_gen will pretend we are upgrading to "bv_future_git_tag"
@ -1926,7 +1914,7 @@ buildvariants:
exec_timeout_factor: 1.5
test_flags: >-
--runAllFeatureFlagTests
--excludeWithAnyTags=incompatible_with_amazon_linux,incompatible_with_shard_merge,requires_external_data_source
--excludeWithAnyTags=incompatible_with_amazon_linux,requires_external_data_source
tasks:
- name: analyze_shard_key_jscore_passthrough_gen
- name: query_golden_classic
@ -2007,7 +1995,6 @@ buildvariants:
- amazon2-arm64-large
- name: session_jscore_passthrough
- name: .shard_split
- name: .shard_merge
- name: .sharding .jscore !.wo_snapshot !.multi_stmt
- name: sharding_api_version_jscore_passthrough_gen
- name: sharding_api_strict_passthrough_gen
@ -2016,8 +2003,6 @@ buildvariants:
- 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
@ -2059,7 +2044,6 @@ buildvariants:
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
test_flags: >-
--excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
--excludeWithAnyTags=incompatible_with_shard_merge
--runAllFeatureFlagTests
multiversion_platform: rhel80
multiversion_edition: enterprise
@ -2161,7 +2145,6 @@ buildvariants:
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
test_flags: >-
--excludeWithAnyTags=requires_ocsp_stapling
--excludeWithAnyTags=incompatible_with_shard_merge
--runAllFeatureFlagTests
tasks:
- name: jsCore
@ -2179,7 +2162,6 @@ buildvariants:
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
test_flags: >-
--excludeWithAnyTags=requires_ocsp_stapling
--excludeWithAnyTags=incompatible_with_shard_merge
--runAllFeatureFlagTests
tasks:
- name: audit
@ -2225,13 +2207,10 @@ buildvariants:
- name: sasl
- name: secondary_reads_passthrough_gen
- name: session_jscore_passthrough
- name: streams
- name: streams_auth
- name: .sharding .jscore !.wo_snapshot
- name: .sharding .common !.csrs
- name: .serverless
- name: .shard_split
- name: .shard_merge
- name: query_stats_passthrough
- name: query_stats_passthrough_writeonly
- name: query_stats_mongos_passthrough
@ -2383,8 +2362,6 @@ buildvariants:
- name: server_selection_json_test_TG
distros:
- rhel80-xlarge
- name: streams
- name: streams_auth
- name: vector_search
- name: vector_search_auth
- name: vector_search_ssl
@ -2883,7 +2860,7 @@ buildvariants:
<<: *linux_arm64_generic_expansions
test_flags: >-
--mongodSetParameters="{storageEngineConcurrencyAdjustmentAlgorithm: fixedConcurrentTransactions}"
--excludeWithAnyTags=incompatible_with_amazon_linux,incompatible_with_shard_merge,requires_external_data_source
--excludeWithAnyTags=incompatible_with_amazon_linux,requires_external_data_source
scons_cache_scope: shared
scons_cache_mode: all
commit_queue_alternate_cache: amazon-linux2-arm64-compile
@ -2974,8 +2951,6 @@ buildvariants:
- 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
@ -3010,7 +2985,6 @@ buildvariants:
test_flags: >-
--runAllFeatureFlagTests
--excludeWithAnyTags=resource_intensive
--excludeWithAnyTags=incompatible_with_shard_merge
### Security Patch-Specific Build Variants ###
- <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-template

View File

@ -6,20 +6,579 @@ include:
- 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. ###
# - filename: etc/evergreen_yml_components/variants/config_shard.yml
- 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_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &amazon_linux2_arm64_compile_variant_name amazon-linux2-arm64-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-compile
# 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_compile_variant_name
- &enterprise-amazon-linux2-arm64-all-feature-flags-template
<<: *amazon_linux2_arm64_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,incompatible_with_shard_merge,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: mqlrun
- name: .multi_shard
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
- name: multiversion_gen
- name: powercycle_smoke
- name: .query_fuzzer
- name: .random_multiversion_ds
- name: .read_write_concern .large
- name: .read_write_concern !.large
- name: .replica_sets !.encrypt !.auth !.ignore_non_generated_replica_sets_jscore_passthrough
- name: replica_sets_jscore_passthrough_gen
- 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: 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: .shard_merge
- 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: .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 !.ignore_non_generated_replica_sets_jscore_passthrough !.fcbis
- name: replica_sets_jscore_passthrough_gen
- 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: --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: mqlrun
- name: noPassthrough_gen
- name: noPassthroughWithMongod_gen
- name: .replica_sets .common !.ignore_non_generated_replica_sets_jscore_passthrough
- name: .replica_sets .multi_oplog !.ignore_non_generated_replica_sets_jscore_passthrough !.gcm
- name: replica_sets_jscore_passthrough_gen
distros:
- windows-vsCurrent-large
- 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_compile_variant_name
depends_on:
- name: archive_dist_test_debug
variant: *amazon_linux2_arm64_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: mqlrun
- name: .multi_shard
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
- name: multiversion_gen
- name: .query_fuzzer
- 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: 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: compile_venv_deps_check
- name: resmoke_validation_tests
- name: version_gen_validation
distros:
- ubuntu2004-small
###########################################
# Copybara buildvariants #
###########################################
- name: &copybara-sync-between-repos copybara-sync-between-repos
modules:
- enterprise
display_name: "* Copybara Sync Between Repos"
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
run_on:
- ubuntu2204-small
stepback: false
tasks:
- name: sync_repo_with_copybara

View File

@ -69,7 +69,7 @@ modules:
- name: enterprise
repo: git@github.com:10gen/mongo-enterprise-modules.git
prefix: src/mongo/db/modules
branch: master
branch: v7.1
- name: wtdevelop
repo: git@github.com:wiredtiger/wiredtiger.git
@ -626,7 +626,7 @@ functions:
"get buildnumber": &get_buildnumber
command: keyval.inc
params:
key: "${build_variant}_master"
key: "${build_variant}_v7.1"
destination: "builder_num"
"run diskstats": &run_diskstats
@ -1585,6 +1585,16 @@ functions:
args:
- "./src/evergreen/lint_fuzzer_sanity_all.sh"
"sync repo with copybara":
- *f_expansions_write
- command: subprocess.exec
type: test
params:
binary: bash
args:
- "src/evergreen/run_python_script.sh"
- "buildscripts/sync_repo_with_copybara.py"
# Used by generator
"run jstestfuzz":
- *f_expansions_write
@ -3845,18 +3855,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"]
@ -4928,6 +4926,18 @@ tasks:
- func: "setup jstestfuzz"
- func: "lint fuzzer sanity all"
- name: sync_repo_with_copybara
tags: []
commands:
- command: manifest.load
- func: "git get project and add git tag"
- *f_expansions_write
- *kill_processes
- *cleanup_environment
- *set_up_venv
- func: "sync repo with copybara"
## integration test suites ##
- <<: *task_template
@ -6156,10 +6166,9 @@ tasks:
use_large_distro: "true"
fallback_num_sub_suites: 10
# TODO(SERVER-57896): Add "serverless" tag to shard merge passthrough when no longer feature flagged
- <<: *gen_task_template
name: shard_merge_jscore_passthrough_gen
tags: ["shard_merge"]
tags: ["serverless"]
commands:
- func: "generate resmoke tasks"
vars:
@ -6167,7 +6176,7 @@ tasks:
- <<: *gen_task_template
name: shard_merge_causally_consistent_jscore_passthrough_gen
tags: ["shard_merge"]
tags: ["serverless"]
commands:
- func: "generate resmoke tasks"
vars:
@ -6218,10 +6227,9 @@ tasks:
vars:
use_large_distro: "true"
# TODO(SERVER-68643): Add "serverless" tag to shard merge passthrough when no longer feature flagged
- <<: *gen_task_template
name: shard_merge_multi_stmt_txn_jscore_passthrough_gen
tags: ["shard_merge"]
tags: ["serverless", "txn"]
commands:
- func: "generate resmoke tasks"
vars:
@ -6775,6 +6783,13 @@ tasks:
- func: "do setup"
- func: "run tests"
- <<: *task_template
name: serverless_MTM
tags: ["serverless"]
commands:
- func: "do setup"
- func: "run tests"
- <<: *gen_task_template
name: sharding_gen
tags: ["sharding", "common"]
@ -6921,6 +6936,15 @@ tasks:
vars:
suite: ssl_x509
- <<: *gen_task_template
name: ssl_linear_gen
tags: ["encrypt", "ssl", "patch_build"]
commands:
- func: "generate resmoke tasks"
vars:
suite: ssl_linear
resmoke_jobs_max: 1
- <<: *gen_task_template
name: fcv_upgrade_downgrade_replica_sets_jscore_passthrough_gen
tags: ["jscore"]
@ -7695,7 +7719,7 @@ tasks:
shell: bash
script: |
set -oe
podman login --username ${release_tools_container_registry_username} --password ${release_tools_container_registry_password} ${release_tools_container_registry}
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
- command: subprocess.exec
params:
binary: bash
@ -7774,7 +7798,7 @@ tasks:
shell: bash
script: |
set -oe
podman login --username ${release_tools_container_registry_username} --password ${release_tools_container_registry_password} ${release_tools_container_registry}
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
# signing windows artifacts
- command: subprocess.exec
@ -8330,7 +8354,7 @@ tasks:
shell: bash
script: |
set -oe
podman login --username ${release_tools_container_registry_username} --password ${release_tools_container_registry_password} ${release_tools_container_registry}
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
- command: subprocess.exec
params:
binary: bash
@ -8511,20 +8535,6 @@ tasks:
suite: cqf_experimental_no_passthrough
use_large_distro: "true"
- <<: *task_template
name: streams
tags: []
commands:
- func: "do setup"
- func: "run tests"
- <<: *task_template
name: streams_auth
tags: []
commands:
- func: "do setup"
- func: "run tests"
- name: shared_scons_cache_pruning
tags: []
exec_timeout_secs: 7200 # 2 hour timeout for the task overall

View File

@ -115,13 +115,6 @@ buildvariants:
- name: .updatefuzzer
- name: aggregation_repeat_queries
- name: audit
- name: burn_in_tags_gen
depends_on:
- name: version_burn_in_gen
variant: generate-tasks-for-version
omit_generated_tasks: true
- name: archive_dist_test_debug
variant: *linux_x86_dynamic_compile_variant_name
- name: burn_in_tests_gen
depends_on:
- name: version_burn_in_gen
@ -231,7 +224,6 @@ buildvariants:
- name: jsCore_min_batch_repeat_queries_ese_gsm
- name: jsCore_txns_large_txns_format
- name: json_schema
- name: .logical_session_cache
- name: .multi_shard .common
- name: .query_fuzzer
- name: .read_write_concern
@ -309,7 +301,6 @@ buildvariants:
- name: jsCore_min_batch_repeat_queries_ese_gsm
- name: jsCore_txns_large_txns_format
- name: json_schema
- name: .logical_session_cache .one_sec
- name: .multi_shard .common
- name: .read_write_concern
- name: replica_sets_large_txns_format_jscore_passthrough

View File

@ -87,21 +87,6 @@ buildvariants:
distros:
- rhel80-large
- <<: *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"
@ -123,17 +108,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

@ -867,6 +867,31 @@ buildvariants:
# - ubuntu2204-arm64-large
- name: generate_buildid_to_debug_symbols_mapping
- name: enterprise-debian10-64
display_name: Jepsen Tests on Enterprise Debian 10
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
modules:
- enterprise
run_on:
- debian10-test
expansions:
compile_flags: >-
--ssl
MONGO_DISTMOD=debian10
-j$(grep -c ^processor /proc/cpuinfo)
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
--use-diagnostic-latches=off
scons_cache_scope: shared
large_distro_name: debian10-build
compile_variant: enterprise-debian10-64
tasks:
- name: compile_and_archive_dist_test_TG
distros:
- debian10-build
- name: .jepsen_docker
distros:
- debian10-large
- name: debian11
display_name: Debian 11
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
@ -2144,9 +2169,6 @@ buildvariants:
- name: test_packages
distros:
- ubuntu2204-large
- name: test_packages_release
distros:
- ubuntu2204-large
- name: .publish
- name: generate_buildid_to_debug_symbols_mapping
@ -2304,9 +2326,6 @@ buildvariants:
- name: test_packages
distros:
- ubuntu2204-arm64-large
- name: test_packages_release
distros:
- ubuntu2204-arm64-large
- name: .publish
- name: generate_buildid_to_debug_symbols_mapping

View File

@ -11,10 +11,10 @@ buildvariants:
tasks:
- name: compile_ninja_next_TG
distros:
- windows-vsCurrent-large
- windows-vsCurrent-xlarge
- name: compile_ninja_TG
distros:
- windows-vsCurrent-large
- windows-vsCurrent-xlarge
- name: macos-enterprise-ninja
display_name: "Ninja Build: macOS Enterprise"

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,9 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
cd src
echo "GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70}" >> "signing-envfile"
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70}" >> "signing-envfile"
set -o errexit
set -o verbose
@ -23,8 +26,7 @@ gpg --yes -v --armor -o $crypt_file_name.sig --detach-sign $crypt_file_name
EOF
podman run \
-e GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70} \
-e GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70} \
--env-file=signing-envfile \
--rm \
-v $(pwd):$(pwd) -w $(pwd) \
${garasign_gpg_image} \

View File

@ -1,11 +1,14 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
cd src
echo "GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70}" >> "signing-envfile"
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70}" >> "signing-envfile"
set -o errexit
set -o verbose
cd src
long_ext=${ext}
if [ "$long_ext" == "tgz" ]; then
long_ext="tar.gz"
@ -55,8 +58,7 @@ sign mongodb-cryptd-$push_name-$push_arch-$suffix.$ext
EOF
podman run \
-e GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70} \
-e GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70} \
--env-file=signing-envfile \
--rm \
-v $(pwd):$(pwd) -w $(pwd) \
${garasign_gpg_image} \

View File

@ -1,11 +1,14 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
cd src
echo "GRS_CONFIG_USER1_USERNAME=${garasign_jsign_username}" >> "signing-envfile"
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_jsign_password}" >> "signing-envfile"
set -o errexit
set -o verbose
cd src
msi_filename=mongodb-${push_name}-${push_arch}-${suffix}.msi
/usr/bin/find build/ -type f | grep msi$ | xargs -I original_filename cp original_filename $msi_filename || true
@ -25,8 +28,7 @@ sign $msi_filename
EOF
podman run \
-e GRS_CONFIG_USER1_USERNAME=${garasign_jsign_username} \
-e GRS_CONFIG_USER1_PASSWORD=${garasign_jsign_password} \
--env-file=signing-envfile \
--rm \
-v $(pwd):$(pwd) -w $(pwd) \
${garasign_jsign_image} \

View File

@ -1,8 +1,6 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
set -o verbose
packagesfile=packages.tgz
curl https://s3.amazonaws.com/mciuploads/${project}/${build_variant}/${revision}/artifacts/${build_id}-packages.tgz >> $packagesfile

View File

@ -9,5 +9,5 @@ function setup_db_contrib_tool {
# We force reinstall here because when we download the previous venv the shebang
# in pipx still points to the old machines python location.
python -m pip --disable-pip-version-check install --force-reinstall --no-deps "pipx==1.2.0" || exit 1
pipx install "db-contrib-tool==0.6.5" || exit 1
pipx install "db-contrib-tool==0.6.7" || exit 1
}

View File

@ -0,0 +1,66 @@
/**
* Checks that caching a query with predicate X, followed by a similar query with X in a rooted $or
* does not pass along the isCountLike attribute to the subquery. Previously we would always pass
* isCountLike to the child, meaning we could retrieve an incorrect plan from the cache and tassert.
*
* @tags: [
* # If all chunks are moved off of a shard, it can cause the plan cache to miss commands.
* assumes_balancer_off,
* does_not_support_stepdowns,
* assumes_unsharded_collection,
* # Plan cache state is node-local and will not get migrated alongside tenant data.
* tenant_migration_incompatible,
* ]
*/
const collName = "is_count_like";
const coll = db[collName];
coll.drop();
// Creating this index allows an isCountLike index plan to be turned into a COUNT_SCAN, reproducing
// the issue.
coll.createIndex({a: 1});
coll.createIndex({b: 1});
coll.createIndex({a: 1, b: 1});
coll.insert({a: 0, b: 0});
function testConsecutiveQueriesWork(firstQuery, secondQuery) {
// Run each query enough to get them cached. Then swap the order, to make sure there are no
// failures if the second query is cached first.
coll.getPlanCache().clear();
for (let i = 0; i < 5; i++) {
firstQuery();
}
for (let i = 0; i < 5; i++) {
secondQuery();
}
coll.getPlanCache().clear();
for (let i = 0; i < 5; i++) {
secondQuery();
}
for (let i = 0; i < 5; i++) {
firstQuery();
}
}
function testCountLikeStage(stage) {
testConsecutiveQueriesWork(
function() {
coll.aggregate([{$match: {a: 0}}, stage]).toArray();
},
function() {
coll.aggregate([{$match: {$or: [{a: 0}, {b: 0}]}}, stage]).toArray();
});
}
testConsecutiveQueriesWork(
function() {
coll.find({a: 0}).count();
},
function() {
coll.find({$or: [{a: 0}, {b: 0}]}).count();
});
// Replacing root with {} and $count are both count-like as well.
testCountLikeStage({$replaceRoot: {newRoot: {}}});
testCountLikeStage({$count: "c"});

View File

@ -1,100 +0,0 @@
"""
#! /usr/bin/env python3
Simulates a human authenticating to PingFederate on the Web, specifically with the
device authorization grant flow.
Given a device authorization endpoint, a username, a user code and a file with necessary setup information, it
will simulate automatically logging in as a human would.
"""
import argparse
import json
import geckodriver_autoinstaller
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
def authenticate_ping(activation_endpoint, userCode, username, test_credentials):
# Install GeckoDriver if needed.
geckodriver_autoinstaller.install()
# Launch headless Firefox to the device authorization endpoint.
firefox_options = Options()
firefox_options.add_argument('-headless')
driver = webdriver.Firefox(options=firefox_options)
driver.get(activation_endpoint)
try:
# Wait for the username, password and signon button to load.
username_input_box = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//input[@id='username']"))
)
password_input_box = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//input[@id='password']"))
)
signon_button = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//a[@id='signOnButton'][@title='Sign On']"))
)
# Enter username.
username_input_box.send_keys(username)
# Enter password.
password_input_box.send_keys(test_credentials[username])
signon_button.click()
# Wait for the user code prompt and submit button to load.
# User code will be added to the input box.
user_code_input_box = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//input[@id='user-code']"))
)
submit_button = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//a[@title='Submit']"))
)
# Enter usercode.
user_code_input_box.send_keys(userCode)
submit_button.click()
# Assert 'Allow' message.
allow_button = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//a[@title='Allow']"))
)
allow_button.click()
# Assert that the landing page contains the "The device is now authorized." text, indicating successful auth.
landing_header = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, "//div[@class='ping-messages']/div"))
)
assert landing_header is not None and "The device is now authorized." in landing_header.text
except Exception as e:
print("Error: ", e)
print("Traceback: ", traceback.format_exc())
print("HTML Source: ", driver.page_source)
else:
print('Success')
finally:
driver.quit()
def main():
parser = argparse.ArgumentParser(description='PingFederate Automated Authentication Simulator')
parser.add_argument('-e', '--activationEndpoint', type=str, help="Endpoint to start activation at")
parser.add_argument('-c', '--userCode', type=str, help="Code to be added in the endpoint to authenticate")
parser.add_argument('-u', '--username', type=str, help="Username to authenticate as")
parser.add_argument('-s', '--setupFile', type=str, help="File containing information generated during test setup, relative to home directory")
args = parser.parse_args()
with open(Path.home() / args.setupFile) as setup_file:
setup_information = json.load(setup_file)
assert args.username in setup_information
authenticate_ping(args.activationEndpoint, args.userCode, args.username, setup_information)
if __name__ == '__main__':
main()

View File

@ -6704,24 +6704,24 @@ export const authCommandsLib = {
]
},
{
// Test that only clusterManager has permission to run $queryStats without transformation
// Test that clusterMonitor has permission to run $queryStats without transformation
testname: "testQueryStatsReadPrivilege",
command: {aggregate: 1, pipeline: [{$queryStats: {}}], cursor: {}},
skipSharded: false,
skipTest: (conn) => {
return !TestData.setParameters.featureFlagQueryStats && !TestData.setParameters.featureFlagQueryStatsFindCommand;
},
testcases: [{runOnDb: adminDbName, roles: roles_clusterManager}]
testcases: [{runOnDb: adminDbName, roles: roles_monitoring}]
},
{
// Test that only clusterManager has permission to run $queryStats with transformation
// Test that clusterMonitor has permission to run $queryStats with transformation
testname: "testQueryStatsReadTransformedPrivilege",
command: {aggregate: 1, pipeline: [{$queryStats: {transformIdentifiers: {algorithm: "hmac-sha-256", hmacKey: BinData(8, "MjM0NTY3ODkxMDExMTIxMzE0MTUxNjE3MTgxOTIwMjE=")}}}], cursor: {}},
skipSharded: false,
skipTest: (conn) => {
return !TestData.setParameters.featureFlagQueryStats && !TestData.setParameters.featureFlagQueryStatsFindCommand;
},
testcases: [{runOnDb: adminDbName, roles: roles_clusterManager}]
testcases: [{runOnDb: adminDbName, roles: roles_monitoring}]
},
{
testname: "top",

View File

@ -43,7 +43,7 @@ function runAgg(db) {
assert.commandWorked(coll.insertMany([engDoc, salesDoc]));
// This will match the documents where the intersection between the allowedRoles field and the
// user"s roles is not empty, i.e. the user"s role allows them to see the document in the
// user's roles is not empty, i.e. the user's role allows them to see the document in the
// results. In this case, only the engDoc has the the "read" role that was assigned to the user,
// so only the engDoc will appear in the results.
let pipeline = [{
@ -52,6 +52,31 @@ function runAgg(db) {
}];
let res = coll.aggregate(pipeline).toArray();
assert.eq([engDoc], res);
// Insert a document that has the currently authenticated user's roles in the allowedRoles
// field, and thus will match the following subpipeline.
let readDoc = {_id: 2, allowedRoles: ["readWriteAnyDatabase", "read"]};
assert.commandWorked(coll.insert(readDoc));
const subpipeline = [{$match: {$expr: {$eq: ["$allowedRoles", "$$USER_ROLES.role"]}}}];
// Ensure that $$USER_ROLES can be present in a $lookup subpipeline.
let findColl = db.getCollection(findCollName);
const lookupPipeline = [
{$lookup: {from: aggCollName, pipeline: subpipeline, as: "docThatMatchesRoles"}},
{$project: {_id: 0, docThatMatchesRoles: 1}}
];
const lookupRes = findColl.aggregate(lookupPipeline).toArray();
assert.eq(
[{"docThatMatchesRoles": [{"_id": 2, "allowedRoles": ["readWriteAnyDatabase", "read"]}]}],
lookupRes);
// Ensure that $$USER_ROLES can be present in a $unionWith subpipeline. The result set should
// include the one document from findColl and the document from the unioned collection inserted
// above where the allowedRoles field has the currently authenticated user's roles.
const unionWithPipeline =
[{$unionWith: {coll: aggCollName, pipeline: subpipeline}}, {$project: {_id: 0}}];
const unionWithRes = findColl.aggregate(unionWithPipeline).toArray();
assert.eq([{a: 1}, {allowedRoles: ["readWriteAnyDatabase", "read"]}], unionWithRes);
}
function runTest(conn, shardingTest = null) {

View File

@ -63,13 +63,16 @@ export var assertWithLevel = function(level) {
}
function wrapAssertFn(fn, args) {
let res;
var doassertSaved = doassert;
try {
doassert = quietlyDoAssert;
fn.apply(assert, args); // functions typically get called on 'assert'
res = fn.apply(assert, args); // functions typically get called on 'assert'
} finally {
doassert = doassertSaved;
}
return res;
}
var assertWithLevel = function() {
@ -105,7 +108,7 @@ export var assertWithLevel = function(level) {
return;
}
wrapAssertFn(assert[fn], arguments);
return wrapAssertFn(assert[fn], arguments);
};
});

View File

@ -201,10 +201,10 @@ workerThread.fsm = async function(workloads, args, options) {
const {workerThread} = await import("jstests/concurrency/fsm_libs/worker_thread.js");
const {fsm} = await import("jstests/concurrency/fsm_libs/fsm.js");
return workerThread.main(workloads, args, function(configs) {
return workerThread.main(workloads, args, async function(configs) {
var workloads = Object.keys(configs);
assert.eq(1, workloads.length);
fsm.run(configs[workloads[0]]);
await fsm.run(configs[workloads[0]]);
});
};

View File

@ -226,7 +226,7 @@ export const workerThread = (function() {
args.latch.await(); // wait for all threads to start
Random.setRandomSeed(args.seed);
run(configs);
await run(configs);
return {ok: 1};
} catch (e) {
args.errorLatch.countDown();

View File

@ -17,7 +17,9 @@ export function abortTransaction(sessionAwareDB, txnNumber) {
ErrorCodes.TransactionCommitted,
ErrorCodes.TransactionTooOld,
ErrorCodes.Interrupted,
ErrorCodes.LockTimeout
ErrorCodes.LockTimeout,
// TransactionRouter will error when trying to abort txns that have not been started
8027900
];
const abortCmd = {
abortTransaction: 1,
@ -33,44 +35,40 @@ export function abortTransaction(sessionAwareDB, txnNumber) {
/**
* This function operates on the last iteration of each thread to abort any active transactions.
*/
export var {cleanupOnLastIteration} = (function() {
function cleanupOnLastIteration(data, func) {
let lastIteration = ++data.iteration >= data.iterations;
let activeException = null;
export function cleanupOnLastIteration(data, func) {
let lastIteration = ++data.iteration >= data.iterations;
let activeException = null;
try {
func();
} catch (e) {
lastIteration = true;
activeException = e;
try {
func();
} catch (e) {
lastIteration = true;
activeException = e;
throw e;
} finally {
if (lastIteration) {
// Abort the latest transactions for this session as some may have been skipped due
// to incrementing data.txnNumber. Go in increasing order, so as to avoid bumping
// the txnNumber on the server past that of an in-progress transaction. See
// SERVER-36847.
for (let i = 0; i <= data.txnNumber; i++) {
try {
let res = abortTransaction(data.sessionDb, i);
if (res.ok === 1) {
break;
}
} catch (exceptionDuringAbort) {
if (activeException !== null) {
print('Exception occurred: in finally block while another exception ' +
'is active: ' + tojson(activeException));
print('Original exception stack trace: ' + activeException.stack);
}
/* eslint-disable-next-line */
throw exceptionDuringAbort;
throw e;
} finally {
if (lastIteration) {
// Abort the latest transactions for this session as some may have been skipped due
// to incrementing data.txnNumber. Go in increasing order, so as to avoid bumping
// the txnNumber on the server past that of an in-progress transaction. See
// SERVER-36847.
for (let i = 0; i <= data.txnNumber; i++) {
try {
let res = abortTransaction(data.sessionDb, i);
if (res.ok === 1) {
break;
}
} catch (exceptionDuringAbort) {
if (activeException !== null) {
print('Exception occurred: in finally block while another exception ' +
'is active: ' + tojson(activeException));
print('Original exception stack trace: ' + activeException.stack);
}
/* eslint-disable-next-line */
throw exceptionDuringAbort;
}
}
}
}
return {cleanupOnLastIteration};
})();
}

View File

@ -78,7 +78,8 @@ export const $config = (function() {
return {
threadCount: 10,
iterations: 100,
// TODO(SERVER-81235): Reset to `iterations: 100` after resolving build failure
iterations: 0,
states: states,
startState: 'query',
transitions: transitions,

View File

@ -35,7 +35,8 @@ const kBaseConfig = {
export const $config = extendWorkload(kBaseConfig, function($config, $super) {
$config.threadCount = 10;
$config.iterations = 500;
// TODO(SERVER-81234): Reset to `iterations: 500` after resolving build failure
$config.iterations = 0;
// The sample rate range for query sampling.
$config.data.minSamplesPerSecond = 1000;
@ -920,6 +921,11 @@ export const $config = extendWorkload(kBaseConfig, function($config, $super) {
};
$config.teardown = function teardown(db, collName, cluster) {
// TODO(SERVER-81234): Remove early return after resolving build failure
if ($config.iterations === 0) {
return;
}
if (cluster.isSharded) {
cluster.executeOnMongosNodes((adminDb) => {
configureFailPoint(adminDb, "queryAnalysisSamplerFilterByComment", {}, "off");
@ -1292,6 +1298,7 @@ export const $config = extendWorkload(kBaseConfig, function($config, $super) {
listSampledQueries: {
analyzeShardKey: 0.2,
enableQuerySampling: 0.1,
find: 0.1,
aggregate: 0.1,
count: 0.1,
distinct: 0.1,

View File

@ -10,10 +10,14 @@
import {assertAlways} from "jstests/concurrency/fsm_libs/assert.js";
import {isEphemeral} from "jstests/concurrency/fsm_workload_helpers/server_types.js";
// WiredTiger eviction is slow on Windows debug variants and can cause timeouts when taking a
// checkpoint through compaction.
const buildInfo = getBuildInfo();
const skipTest = buildInfo.debug && buildInfo.buildEnvironment.target_os == "windows";
// TODO(SERVER-81114): re-enable the buildInfo checks below when the cache eviction issue is
// resolved.
const skipTest = true;
// WiredTiger eviction is slow on Windows debug variants and can cause timeouts when
// taking a checkpoint through compaction.
// const buildInfo = getBuildInfo();
// const skipTest = buildInfo.debug && buildInfo.buildEnvironment.target_os == "windows";
export const $config = (function() {
var states = (function() {

View File

@ -0,0 +1,102 @@
/**
* create_capped_collection_visibility_snapshot.js
*
* Repeatedly creates a capped collection, while concurrent readers try to establish a capped
* visibility snapshot.
*
* @tags: [
* requires_capped,
* # This test works on a capped collection, which do not support sharding.
* assumes_unsharded_collection,
* ]
*/
import {assertAlways} from "jstests/concurrency/fsm_libs/assert.js";
export const $config = (function() {
const data = {
// Use the workload name as a prefix for the collection name,
// since the workload name is assumed to be unique.
prefix: 'create_capped_collection_visibility_snapshot',
collectionCount: 2,
};
const states = (function() {
const options = {
capped: true,
size: 8192 // multiple of 256; larger than 4096 default
};
function randomCollectionName(prefix, collCount) {
return prefix + Random.randInt(collCount);
}
function create(db, collName) {
const localDb = db.getSiblingDB("local");
const myCollName = randomCollectionName(this.prefix, this.collectionCount);
localDb.runCommand({drop: myCollName});
localDb.createCollection(myCollName, options);
localDb[myCollName].insert({x: 1});
}
function findOne(db, collName) {
const localDb = db.getSiblingDB("local");
const myCollName = randomCollectionName(this.prefix, this.collectionCount);
for (let i = 0; i < 10; ++i) {
let res = localDb.runCommand({find: myCollName, filter: {}});
assertAlways.commandWorked(res);
}
}
function getMore(db, collName) {
const localDb = db.getSiblingDB("local");
const myCollName = randomCollectionName(this.prefix, this.collectionCount);
for (let i = 0; i < 10; ++i) {
let res = localDb.runCommand(
{find: myCollName, filter: {}, tailable: true, batchSize: 0});
assertAlways.commandWorked(res);
assertAlways.commandWorkedOrFailedWithCode(
localDb.runCommand({getMore: res.cursor.id, collection: myCollName}),
[ErrorCodes.QueryPlanKilled, ErrorCodes.CursorNotFound]);
}
}
return {create: create, findOne: findOne, getMore: getMore};
})();
let internalQueryExecYieldIterationsDefault;
function setup(db, collName, cluster) {
// We temporarily reduce the query yield iterations to force yield/restore on getMore.
cluster.executeOnMongodNodes((db) => {
const res = db.adminCommand({setParameter: 1, internalQueryExecYieldIterations: 1});
assert.commandWorked(res);
internalQueryExecYieldIterationsDefault = res.was;
});
}
function teardown(db, collName, cluster) {
cluster.executeOnMongodNodes((db) => {
const res = db.adminCommand({
setParameter: 1,
internalQueryExecYieldIterations: internalQueryExecYieldIterationsDefault
});
assert.commandWorked(res);
});
}
const transition = {create: 1, findOne: 4, getMore: 4};
const transitions = {create: transition, findOne: transition, getMore: transition};
return {
threadCount: 20,
// TODO(SERVER-81258): Return to `iterations: 100` after build failure is resolved
iterations: 0,
data: data,
startState: 'create',
states: states,
transitions: transitions,
setup: setup,
teardown: teardown,
};
})();

View File

@ -198,11 +198,12 @@ export const $config = (function() {
const exceptionCode = e.code;
if (exceptionCode == ErrorCodes.ConflictingOperationInProgress ||
exceptionCode == ErrorCodes.ReshardCollectionInProgress ||
exceptionCode == ErrorCodes.NamespaceNotSharded) {
exceptionCode == ErrorCodes.NamespaceNotSharded ||
exceptionCode == ErrorCodes.NamespaceNotFound) {
// It is fine for a resharding operation to throw ConflictingOperationInProgress
// if a concurrent resharding with the same collection is ongoing.
// It is also fine for a resharding operation to throw NamespaceNotSharded,
// because a drop state could've happend recently.
// It is also fine for a resharding operation to throw NamespaceNotSharded or
// NamespaceNotFound because a drop state could've happend recently.
return;
}
throw e;
@ -312,7 +313,8 @@ export const $config = (function() {
return {
threadCount: 12,
iterations: 64,
// TODO(SERVER-81237): Reset to `iterations: 64` after resolving build failure
iterations: 0,
startState: 'init',
states: states,
transitions: uniformDistTransitions(states),

View File

@ -7,7 +7,7 @@
* # Time-series findAndModify does not support retryable writes.
* requires_non_retryable_writes,
* does_not_support_transactions,
* requires_fcv_71,
* featureFlagTimeseriesUpdatesSupport,
* ]
*/
import {assertAlways} from "jstests/concurrency/fsm_libs/assert.js";
@ -49,5 +49,8 @@ export const $config = extendWorkload($baseConfig, function($config, $super) {
moveChunk: {insert: 1, doFindAndRemove: 1, moveChunk: 0},
};
// TODO(SERVER-81239): Remove next line after resolving build failure
$config.iterations = 0;
return $config;
});

View File

@ -8,7 +8,7 @@
* requires_timeseries,
* # Time-series findAndModify does not support retryable writes.
* requires_non_retryable_writes,
* requires_fcv_71,
* featureFlagTimeseriesUpdatesSupport,
* ]
*/
@ -50,5 +50,8 @@ export const $config = extendWorkload($baseConfig, function($config, $super) {
insert: {findAndRemove: 0.4, deleteBucket: 0.2, insert: 0.4}
};
// TODO(SERVER-81240): Remove next line after resolving build failure
$config.iterations = 0;
return $config;
});

View File

@ -6,6 +6,7 @@
* requires_fcv_71,
* requires_sharding,
* uses_transactions,
* assumes_balancer_off,
* ]
*/
import "jstests/libs/parallelTester.js";
@ -18,6 +19,8 @@ import {
export const $config = extendWorkload($baseConfig, function($config, $super) {
$config.startState = "init";
$config.iterations = 25;
$config.threadCount = 5;
// Use a CountDownLatch as if it were a std::atomic<long long> shared between all of the
// threads. The collection name is suffixed with the current this.latch.getCount() value
@ -106,38 +109,36 @@ export const $config = extendWorkload($baseConfig, function($config, $super) {
};
$config.transitions = {
init:
{refineCollectionShardKey: 0.25, updateOne: 0.25, deleteOne: 0.25, findAndModify: 0.25},
init: {updateOne: 0.33, deleteOne: 0.33, findAndModify: 0.34},
updateOne: {
refineCollectionShardKey: 0.2,
updateOne: 0.2,
deleteOne: 0.2,
findAndModify: 0.2,
flushRouterConfig: 0.2
refineCollectionShardKey: 0.05,
updateOne: 0.3,
deleteOne: 0.3,
findAndModify: 0.3,
flushRouterConfig: 0.05
},
deleteOne: {
refineCollectionShardKey: 0.2,
updateOne: 0.2,
deleteOne: 0.2,
findAndModify: 0.2,
flushRouterConfig: 0.2
refineCollectionShardKey: 0.05,
updateOne: 0.3,
deleteOne: 0.3,
findAndModify: 0.3,
flushRouterConfig: 0.05
},
findAndModify: {
refineCollectionShardKey: 0.2,
updateOne: 0.2,
deleteOne: 0.2,
findAndModify: 0.2,
flushRouterConfig: 0.2
refineCollectionShardKey: 0.05,
updateOne: 0.3,
deleteOne: 0.3,
findAndModify: 0.3,
flushRouterConfig: 0.05
},
refineCollectionShardKey: {
refineCollectionShardKey: 0.2,
updateOne: 0.2,
deleteOne: 0.2,
findAndModify: 0.2,
flushRouterConfig: 0.2
refineCollectionShardKey: 0.05,
updateOne: 0.3,
deleteOne: 0.3,
findAndModify: 0.3,
flushRouterConfig: 0.05
},
flushRouterConfig:
{refineCollectionShardKey: 0.25, updateOne: 0.25, deleteOne: 0.25, findAndModify: 0.25},
flushRouterConfig: {updateOne: 0.33, deleteOne: 0.33, findAndModify: 0.34},
};
return $config;

View File

@ -0,0 +1,23 @@
import {workerThread} from "jstests/concurrency/fsm_libs/worker_thread.js";
async function shouldForwardErrorsFromAsyncRunCallback(conn) {
const args = {
host: conn.host,
dbName: 'test',
tid: 'thread0',
clusterOptions: {sharded: false, replication: false},
latch: new CountDownLatch(1),
errorLatch: new CountDownLatch(1)
};
const res = await workerThread.main([], args, async function() {
throw new Error('Thrown intentionally');
});
assert.eq(res.err,
'Error: Thrown intentionally',
'should forward errors thrown in async run callback');
}
const conn = MongoRunner.runMongod();
await shouldForwardErrorsFromAsyncRunCallback(conn);
MongoRunner.stopMongod(conn);

View File

@ -4,6 +4,7 @@
* @tags: [
* # Queries on mongoS may not request or provide a resume token.
* assumes_against_mongod_not_mongos,
* cannot_run_during_upgrade_downgrade,
* ]
*/

View File

@ -18,7 +18,7 @@ function waitUntilOpCountIs(opFilter, num) {
assert.soon(() => {
let ops = db.getSiblingDB('admin')
.aggregate([
{$currentOp: {}},
{$currentOp: {allUsers: true, idleConnections: true}},
{$match: opFilter},
])
.toArray();

View File

@ -0,0 +1,45 @@
/*
* Test that query plans involving sort and project are correct.
*/
(function() {
const coll = db.sort_project_queries;
coll.drop();
assert.commandWorked(coll.insert({_id: 0, a: 1, b: 2, foo: 1001, bar: 2001}));
assert.commandWorked(coll.insert({_id: 1, a: 1, b: 22, foo: 1002, bar: 2002}));
function runOneDocTest(pipeline, expectedResult) {
let res = coll.aggregate(pipeline).toArray();
assert.eq(res.length, 1);
assert.docEq(res[0], expectedResult);
}
// Inclusion projection preserving relevant fields after sort.
{
let pipe = [
{$sort: {b: 1}},
{$project: {a: 1, foo: 1}},
{$group: {_id: '$a', maxFoo: {$max: "$foo"}}}
];
runOneDocTest(pipe, {_id: 1, maxFoo: 1002});
}
// Inclusion projection removing a relevant field after sort.
{
let pipe = [{$sort: {b: 1}}, {$project: {a: 1}}, {$group: {_id: '$a', maxFoo: {$max: "$foo"}}}];
runOneDocTest(pipe, {_id: 1, maxFoo: null});
}
// Exclusion projection removing irrelevant field after sort.
{
let pipe = [{$sort: {b: 1}}, {$project: {z: 0}}, {$group: {_id: '$a', maxFoo: {$max: "$foo"}}}];
runOneDocTest(pipe, {_id: 1, maxFoo: 1002});
}
// Exclusion projection removing a subsequently referenced field after sort.
{
let pipe =
[{$sort: {b: 1}}, {$project: {foo: 0}}, {$group: {_id: '$a', maxFoo: {$max: "$foo"}}}];
runOneDocTest(pipe, {_id: 1, maxFoo: null});
}
})();

View File

@ -9,6 +9,7 @@
* requires_getmore,
* requires_persistence,
* no_selinux,
* cannot_run_during_upgrade_downgrade,
* ]
*/

View File

@ -12,6 +12,7 @@
* multiversion_incompatible,
* requires_non_retryable_writes,
* tenant_migration_incompatible,
* cannot_run_during_upgrade_downgrade,
* ]
*/

View File

@ -2,9 +2,10 @@
* Tests correctness of time-series bucket granularity configuration.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # This test calls "find" with a filter on "_id" whose value is a namespace string. We cannot

View File

@ -2,9 +2,10 @@
* Tests correctness of time-series bucket granularity configuration.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -124,4 +125,4 @@
buckets = bucketsColl.find().toArray();
assert.eq(2, buckets.length);
assert.eq(buckets[1].control.min.t, ISODate("2021-06-24T00:00:00.000Z"));
})();
})();

View File

@ -3,9 +3,11 @@
* unpacking all buckets, while ensuring no incorrect results are created
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different
* # buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # Explain of a resolved view must be executed by mongos.

View File

@ -8,8 +8,9 @@
* # This complicates aggregation extraction.
* do_not_wrap_aggregations_in_facets,
* # Refusing to run a test that issues an aggregation command with explain because it may
* # return incomplete results if interrupted by a stepdown.
* # return incomplete results if interrupted by a stepdown/tenant migration.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -93,6 +93,36 @@ const insensitive = {
assert.eq(1, res2.itcount(), res2.toArray()); // should match only "5"
}());
(function testFind_OnlyQueryHasCollation() {
coll.drop();
assert.commandWorked(
db.createCollection(coll.getName(), {timeseries: {timeField: 'time', metaField: 'meta'}}));
// This should generate a bucket with control.min.value = 'C' and control.max.value = 'c'.
assert.commandWorked(coll.insert({time: ISODate(), meta: 42, value: "C"}));
assert.commandWorked(coll.insert({time: ISODate(), meta: 42, value: "b"}));
assert.commandWorked(coll.insert({time: ISODate(), meta: 42, value: "c"}));
// A query with default collation would use the bucket's min/max and find the two matches.
const resWithNoCollation = coll.find({value: {$lt: "c"}});
assert.eq(2,
resWithNoCollation.itcount(),
resWithNoCollation.toArray()); // should match "C" and "b".
// If a query with 'insensitive' collation used the bucket's min/max it would miss the bucket.
// Check, that it doesn't.
const resWithCollation_find = coll.find({value: {$lt: "c"}}).collation(insensitive);
assert.eq(1,
resWithCollation_find.itcount(),
resWithCollation_find.toArray()); // should match only "b".
// Run the same test with aggregate command.
const resWithCollation_agg =
coll.aggregate([{$match: {value: {$lt: "c"}}}], {collation: insensitive}).toArray();
assert.eq(1, resWithCollation_agg.length, resWithCollation_agg);
}());
(function testAgg_GroupByMetaField() {
coll.drop();

View File

@ -2,9 +2,10 @@
* Tests basic index creation and operations on a time-series bucket collection.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -1,8 +1,8 @@
/**
* Tests maximum number of measurements held in each bucket in a time-series buckets collection.
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* requires_collstats,

View File

@ -1,9 +1,10 @@
/**
* Tests maximum time-range of measurements held in each bucket in a time-series buckets collection.
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns/tenant migration
* # may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # We assume that all nodes in a mixed-mode replica set are using compressed inserts to a

View File

@ -3,9 +3,10 @@
* collection.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -65,4 +66,4 @@ TimeseriesTest.run((insert) => {
buckets = bucketsColl.find().toArray();
assert.eq(buckets.length, 1, 'Expected one bucket but found ' + tojson(buckets));
assert.neq(buckets[0]._id, bucketId);
});
});

View File

@ -3,9 +3,10 @@
* interesting boundaries.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # Bucketing behavior with timestamp offsets greater than 32 bits was fixed in 6.1
* requires_fcv_61,
* # We need a timeseries collection.
@ -81,4 +82,4 @@
assert.commandWorked(coll.insert({m: 2, t: ISODate("2105-06-24T06:28:16Z")}));
assert.commandWorked(coll.insert({m: 2, t: ISODate("1969-05-18T00:00:00.000Z")}));
assert.eq(2, bucketsColl.find().itcount());
})();
})();

View File

@ -2,9 +2,10 @@
* Tests that time-series collections respect collations for metadata and min/max.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -89,4 +90,4 @@ TimeseriesTest.run((insert) => {
assert.eq(buckets[2].control.min.y, null);
assert.eq(buckets[2].control.max.x, null);
assert.eq(buckets[2].control.max.y, null);
});
});

View File

@ -136,32 +136,23 @@ function runTest({
});
})();
// Since the query collation does not match the collection collation, there should be no predicates
// on control fields. The predicates on meta field are okay because buckets are grouped based on
// real values, ignoring their collation.
(function testQueryLevelCollation() {
// Residual filter.
runTest({
deleteFilter: {str: "Hello"},
queryCollation: caseSensitive,
nDeleted: 0,
expectedBucketQuery: {
$and: [
closedBucketFilter,
{"control.max.str": {$_internalExprGte: "Hello"}},
{"control.min.str": {$_internalExprLte: "Hello"}}
]
},
expectedBucketQuery: closedBucketFilter,
expectedDeleteStage: "TS_MODIFY"
});
runTest({
deleteFilter: {str: "Hello"},
queryCollation: caseInsensitive,
nDeleted: 6,
expectedBucketQuery: {
$and: [
closedBucketFilter,
{"control.max.str": {$_internalExprGte: "Hello"}},
{"control.min.str": {$_internalExprLte: "Hello"}}
]
},
expectedBucketQuery: closedBucketFilter,
expectedDeleteStage: "TS_MODIFY"
});

View File

@ -7,9 +7,10 @@
* assumes_read_preference_unchanged,
* # Fail points in this test do not exist on mongos.
* assumes_against_mongod_not_mongos,
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # Uses parallel shell to wait on fail point

View File

@ -3,9 +3,10 @@
* bucket document by targeting them with their meta field value.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -10,9 +10,10 @@
* assumes_read_concern_unchanged,
* # This test only synchronizes deletes on the primary.
* assumes_read_preference_unchanged,
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # Uses parallel shell to wait on fail point

View File

@ -8,6 +8,8 @@
* requires_fcv_71,
* # To avoid burn-in tests in in-memory build variants
* requires_persistence,
* # TODO SERVER-66393 Remove this tag.
* featureFlagTimeseriesUpdatesSupport,
* # TODO SERVER-78683: Remove this tag.
* # Internal transaction api might not handle stepdowns correctly and time-series retryable
* # updates use internal transaction api.

View File

@ -4,9 +4,10 @@
* @tags: [
* # Explain of a resolved view must be executed by mongos.
* directly_against_shardsvrs_incompatible,
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # Requires pipeline optimization to run in order to produce expected explain output
* requires_pipeline_optimization,
* # We need a timeseries collection.
@ -134,4 +135,4 @@ runTest(
// We test arrays wrapping objects and objects wrapping arrays as different ways of achieving
// multiple bounds on 'a.b'.
runTest([{a: {b: [3, 4]}}, {a: [{b: 1}, {b: 2}]}], {"a.b": {$lt: 2}}, [{a: [{b: 1}, {b: 2}]}]);
runTest([{a: {b: [3, 4]}}, {a: [{b: 1}, {b: 2}]}], {"a.b": {$gte: 3}}, [{a: {b: [3, 4]}}]);
runTest([{a: {b: [3, 4]}}, {a: [{b: 1}, {b: 2}]}], {"a.b": {$gte: 3}}, [{a: {b: [3, 4]}}]);

View File

@ -4,7 +4,7 @@
* @tags: [
* # We need a timeseries collection.
* requires_timeseries,
* requires_fcv_71,
* featureFlagTimeseriesUpdatesSupport,
* # TODO SERVER-76583 Remove the following two tags.
* does_not_support_retryable_writes,
* requires_non_retryable_writes,

View File

@ -8,9 +8,10 @@
* assumes_unsharded_collection,
* # Explain of a resolved view must be executed by mongos.
* directly_against_shardsvrs_incompatible,
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -2,9 +2,10 @@
* Tests index creation, index drops, list indexes, hide/unhide index on a time-series collection.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -2,9 +2,10 @@
* Tests collation with time-series collections.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -96,4 +97,4 @@ TimeseriesTest.run((insert) => {
assert.eq(false,
indexSpecsString[0].collation.numericOrdering,
'Invalid index spec for index_string: ' + tojson(indexSpecsString[0]));
});
});

View File

@ -6,9 +6,10 @@
* # $indexStats stage. The former operation must be routed to the primary in a replica set,
* # whereas the latter may be routed to a secondary.
* assumes_read_preference_unchanged,
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -2,9 +2,10 @@
* Tests the creation of partial, TTL indexes on a time-series collection.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -145,4 +146,4 @@ const resetTsColl = function(extraOptions = {}) {
assert.commandFailedWithCode(coll.createIndex(timeAndDataSpec, filterOnMeta),
ErrorCodes.CannotCreateIndex);
}
}());
}());

View File

@ -1,9 +1,10 @@
/**
* Tests running the delete command on a time-series collection closes the in-memory bucket.
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]

View File

@ -3,9 +3,10 @@
* were updated.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # Test explicitly relies on multi-updates.
* requires_multi_updates,
* # We need a timeseries collection.

View File

@ -5,9 +5,10 @@
* bucket into a time-series collection.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # We assume that all nodes in a mixed-mode replica set are using compressed inserts to
@ -99,4 +100,4 @@ const bucketColl = db.getCollection(bucketCollName);
}
jsTestLog("Exiting targetNewBucketAndCheckCompressed.");
})();
})();

View File

@ -3,9 +3,10 @@
* control.min and control.max fields.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # Test examines collection stats.
* requires_collstats,
* # Large measurement handling changed in binVersion 6.1.
@ -70,4 +71,4 @@ for (let i = 0; i < numMeasurements; i++) {
batch.push(doc);
}
assert.commandWorked(coll.insertMany(batch), {ordered: false});
checkAverageBucketSize();
checkAverageBucketSize();

View File

@ -2,9 +2,10 @@
* Test that time-series bucket collections work as expected with $lookup.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* references_foreign_collection,
@ -243,4 +244,4 @@ TimeseriesTest.run((insert) => {
testFunc(collAOption, collBOption);
});
});
});
});

View File

@ -2,9 +2,10 @@
* Tests that only measurements with a binary identical meta field are included in the same bucket
* in a time-series collection.
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # We assume that all nodes in a mixed-mode replica set are using compressed inserts to a
@ -178,4 +179,4 @@ TimeseriesTest.run((insert) => {
{_id: 2, time: t[2], meta: {a: [2, 1, 3]}, x: 20},
{_id: 3, time: t[3], meta: {a: [2, 1, 3]}, x: 30},
]);
});
});

View File

@ -3,9 +3,10 @@
* maximum values inserted into the bucket.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -123,4 +124,4 @@ TimeseriesTest.run((insert) => {
runTest({a: NumberInt(1)}, {a: NumberInt(1)}, {a: NumberLong(2)});
runTest({a: NumberDecimal(2.5)}, {a: NumberInt(1)}, {a: NumberDecimal(2.5)});
runTest({a: Number(0.5)}, {a: Number(0.5)}, {a: NumberDecimal(2.5)});
});
});

View File

@ -3,9 +3,10 @@
* they are within the time range, regardless of the order in which they are inserted.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -64,4 +65,4 @@ TimeseriesTest.run((insert) => {
assert.eq(buckets[1].control.min[timeFieldName], times[2]);
assert.eq(buckets[1].control.max[timeFieldName], times[2]);
});
});
});

View File

@ -2,9 +2,10 @@
* Test the input/output behavior of some predicates on time-series collections.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* ]
@ -375,4 +376,4 @@ checkAllBucketings({"mt.a": {$size: 1}}, [
{mt: {a: [{b: 2}]}},
{mt: {a: [{b: 3}]}},
{mt: {a: [{b: 2}, {b: 3}]}},
]);
]);

View File

@ -2,9 +2,14 @@
* Inserts time-series measurements into closed buckets identified by query-based reopening method.
*
* @tags: [
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
* # writes splitting between two primaries, and thus different buckets.
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
* # migrations may result in writes splitting between two primaries, and thus different buckets.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # This test inserts uncompressed buckets directly into the buckets collection. This may cause
* # intermittent failures on tenant migration passthroughs when validation checks that all
* # buckets are compressed.
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* # This test depends on stats read from the primary node in replica sets.
@ -315,10 +320,7 @@ const checkIfBucketReopened = function(
"closed": false
},
"meta": "NonSuitableBucket2",
"data": {
"_id": {"0": ObjectId("63091c30138e9261fd70a903")},
"time": {"0": ISODate("2022-08-26T19:19:30Z")}
}
"data": {"_id": BinData(7, "BwBjCRwwE46SYf1wqQMA"), "time": BinData(7, "CQDQVZjbggEAAAA=")}
};
const closedAndCompressedBucketDoc = {
"_id": ObjectId("06091c2c050b7495eaef4584"),
@ -335,10 +337,7 @@ const checkIfBucketReopened = function(
"closed": true
},
"meta": "NonSuitableBucket3",
"data": {
"_id": {"0": ObjectId("63091c30138e9261fd70a903")},
"time": {"0": ISODate("2022-08-26T19:19:30Z")}
}
"data": {"_id": BinData(7, "BwBjCRwwE46SYf1wqQMA"), "time": BinData(7, "CQDQVZjbggEAAAA=")}
};
const year2000BucketDoc = {
"_id": ObjectId("07091c2c050b7495eaef4585"),

View File

@ -7,10 +7,12 @@
* not_allowed_with_security_token,
* # Queries on mongoS may not request or provide a resume token.
* assumes_against_mongod_not_mongos,
* # Resuming may not work properly with stepdowns.
* # Resuming may not work properly with stepdowns/tenant migration.
* does_not_support_stepdowns,
* tenant_migration_incompatible,
* # We need a timeseries collection.
* requires_timeseries,
* cannot_run_during_upgrade_downgrade,
* ]
*/
import {TimeseriesTest} from "jstests/core/timeseries/libs/timeseries.js";

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