Compare commits

...

828 Commits

Author SHA1 Message Date
Aaron Morand
e9c4875ae3 SERVER-72276 Removing outdated entries for multiversion tests 2022-12-21 19:12:13 -05:00
Dan Larkin-York
e7acc50f7d SERVER-71020 SERVER-71939 Ensure aborting time series batch eventually removes bucket from catalog
(cherry picked from commit 6c1b682951)
(cherry picked from commit bc4e993a11)
2022-12-21 16:03:38 +00:00
Pierlauro Sciarelli
9ba29038b9 SERVER-71787 Balancer needs to attach forceJumbo to moveRange command 2022-12-21 14:06:28 +00:00
jasurbeknurboyev
f5588ecf82 SERVER-71921 Task update_timeseries_fuzzer times out on some variants 2022-12-21 10:52:32 +00:00
Sergi Mateo Bellido
fed81c016c SERVER-71689 Refresh the catalogCache after dropping a collection
(cherry picked from commit a92c4effc8)
2022-12-21 08:40:43 +00:00
Davis Haupt
70bbc40c52 SERVER-72222 fix mapReduce single reduce optimization in sharded clusters 2022-12-21 01:17:48 +00:00
Pierlauro Sciarelli
21b2615135 SERVER-71436 Range deleter must not aggressively spam the log when shard key index not found 2022-12-21 00:05:29 +00:00
Paolo Polato
7fb90620aa Revert "SERVER-70100 Ensure at-least-once emission of oplog entry on shardCollection() completion"
This reverts commit 3972acca68.
2022-12-20 21:54:09 +00:00
Silvia Surroca
515e14784d SERVER-70768 Balancer use wrong chunk size for jumbo chunks
(cherry picked from commit b8c329e86a)
2022-12-20 16:18:04 +00:00
dalyd
81103ed0dc SERVER-72091 Enable auth-delay sys-perf variant 2022-12-20 15:32:45 +00:00
Paolo Polato
3972acca68 SERVER-70100 Ensure at-least-once emission of oplog entry on shardCollection() completion 2022-12-20 10:38:36 +00:00
Paolo Polato
86879bd6bc SERVER-72065 Fix refresh of sessions cache in CSRS secondary nodes 2022-12-17 23:43:21 +00:00
Mickey. J Winters
b953dbf36c SERVER-65259 fix cursor leak in aggregation that requires merging on shard
(cherry-picked from commit 7f40c17156)
2022-12-15 19:35:24 +00:00
Gregory Noma
8084d22db5 SERVER-72005 Run TSBS on 2022-11 sys-perf variants 2022-12-15 15:24:41 +00:00
Denis Grebennicov
c4ce50093e SERVER-66337 Ensure that check for the interrupt is done on every getNext() call in datasize_kill_op.js 2022-12-15 12:39:00 +00:00
Tausif Rahman
d4ab3fcbfd SERVER-71467 Dont run feature flag specific tests for multiversion testing
(cherry picked from commit 58818ad6cc)
2022-12-14 15:24:11 +00:00
AbdulrahmanKanaan
37a912f55b SERVER-71449 log_successs_msg: not found
when using service status command
fixing "/etc/init.d/mongodb: 251: log_successs_msg: not found" error
spelling mistake "log_successs_msg" to "log_success_msg"

Closes https://github.com/mongodb/mongo/pull/1500

Signed-off-by: Ryan Egesdahl <ryan.egesdahl@mongodb.com>
(cherry picked from commit 852d4db7d0)
2022-12-13 19:55:52 +00:00
Ryan Egesdahl
dcf6bd63ed Revert "SERVER-69927 Fix benchmark analysis"
This reverts commit e3a200c324.
2022-12-13 01:45:06 +00:00
Moustafa Maher Khalil
be4ae87b04 SERVER-72011 Add the ability to load js files to fsm worker threads 2022-12-12 19:59:01 +00:00
Trevor Guidry
003fb8447a SERVER-71984 add directConnection=True to standalone.py for multiversion testing 2022-12-12 16:48:03 +00:00
Allison Easton
d94b9f177b SERVER-71756 Defragmentation policy should issue dataSize commands with estimate true
(cherry picked from commit 49c71b3699)
2022-12-12 12:57:55 +00:00
Allison Easton
9829902231 SERVER-71788 Defragmentation should handle ChunkTooBig errors
(cherry picked from commit 76d4cb7bd5)
2022-12-12 12:18:42 +00:00
dalyd
765bcbfe11 SERVER-70594 Add updated build variants to sys-perf v6.0 branch 2022-12-09 19:34:43 +00:00
Matthew Russotto
4828567d0c SERVER-71247 Make final methods in StubMongoProcessInterface non-final.
(cherry picked from commit 1b48004aa0)
2022-12-09 15:51:37 +00:00
ali-mir
198cd42e24 SERVER-65177 Use executor clock to calculate elapsed initial sync time
(cherry picked from commit 9d47a813c0)
2022-12-08 22:05:40 +00:00
Tommaso Tocci
1372bfc84c SERVER-70237 Chunks merge commit must not create a BSON object too large
Non trivial backport of SERVER-70237 and part of SERVER-65838
2022-12-07 20:53:04 +00:00
Ryan Egesdahl
e3a200c324 SERVER-69927 Fix benchmark analysis
(cherry picked from commit 2b311888e9)
2022-12-06 21:50:17 +00:00
Gabriel Marks
01d06e110c SERVER-67704 SERVER-67705 Fix processor package counting for ARM 2022-12-06 21:14:51 +00:00
Tausif Rahman
3a55839246 SERVER-68500 multiversion tag files are not correctly excluding tests in CI
(cherry picked from commit f4dae67839)
2022-12-06 17:08:45 +00:00
Luke Chen
23c4c332e6 Import wiredtiger: b53bacaa4e0c5fece1e63608cc7bb2430f671ff0 from branch mongodb-6.0
ref: f0ff3ca5c8..b53bacaa4e
for: 6.0.4

WT-10250 Remove certain Evergreen builders for release branches
2022-12-05 05:22:19 +00:00
Luke Chen
4c48778c94 Import wiredtiger: f0ff3ca5c8e3ebe1147059e4200b26dd58e420e4 from branch mongodb-6.0
ref: 39b6544025..f0ff3ca5c8
for: 6.0.4

WT-10081 Fix failure format configs for older branch
2022-12-05 05:22:19 +00:00
Luke Chen
59051472b8 Import wiredtiger: 39b6544025d2b4f6bbf5ef251dbcdaffee638fd8 from branch mongodb-6.0
ref: 043606c2f8..39b6544025
for: 6.0.4

WT-9751 Fix memory leak if we fail eviction in single page rewrite
2022-12-05 05:22:18 +00:00
Luke Chen
632ecbc1c4 Import wiredtiger: 043606c2f83e919f0f9de5c9c9cac7d771dc0af1 from branch mongodb-6.0
ref: 8e14a40cb6..043606c2f8
for: 6.0.4

WT-9805 Save the updates need to be deleted from history store and delete them later
2022-12-05 05:22:18 +00:00
Luke Chen
35dc593a9e Import wiredtiger: 8e14a40cb6db5cd5d021c111b8e1abcaff7b79bc from branch mongodb-6.0
ref: d90f4fa81d..8e14a40cb6
for: 6.0.4

WT-9765 Fix handling a prepared commit after a prepared rollback with eviction failure
2022-12-05 05:22:18 +00:00
Luke Chen
123043c43a Import wiredtiger: d90f4fa81dec7af7d20f7ee52f3d1258aa2c20e6 from branch mongodb-6.0
ref: 29d40146fc..d90f4fa81d
for: 6.0.4

WT-9705 Fix accidentally freeing update on the update chain in prepared commit
2022-12-05 05:22:18 +00:00
Luke Chen
4eecc7eea2 Import wiredtiger: 29d40146fc78114efd83aa579c5d9c013f0a6016 from branch mongodb-6.0
ref: af07f15ca3..29d40146fc
for: 6.0.4

WT-9592 Fix rollback to stable not clearing the WT_UPDATE_TO_DELETE_FROM_HS flag
2022-12-05 05:22:18 +00:00
Luke Chen
b0ec261419 Import wiredtiger: af07f15ca3491e6cb9d278f3afefb93dcc8248ec from branch mongodb-6.0
ref: 7b279fd981..af07f15ca3
for: 6.0.4

WT-9428 Fix two asserts in rec_visibility.c
2022-12-05 05:22:18 +00:00
Luke Chen
c044e693a5 Import wiredtiger: 7b279fd981e787fd9fe294a706aec8a0fbaa200b from branch mongodb-6.0
ref: 34136bb791..7b279fd981
for: 6.0.4

WT-9268 Delay deletion the history store record to reconciliation
2022-12-05 05:22:18 +00:00
Tommaso Tocci
62c6074e33 SERVER-71759 dataSize command doesn't yield 2022-12-04 09:48:57 +00:00
Matthew Russotto
69cc757bea SERVER-68338 sync_source_changes.js needs to wait for heartbeat
(cherry picked from commit 5f83f7ee5c)
2022-12-02 19:07:21 +00:00
Ivan Fefer
d3e569ea57 SERVER-70394 Fix self-swap in MultiPlanStage::removeRejectedPlans
(cherry picked from commit df498b1771)
2022-12-02 11:33:16 +00:00
Ivan Fefer
184d528d49 SERVER-58712: Fix update performance on collections with multiple secondary indexes on same key
(cherry picked from commit 1d93d09948)
2022-12-02 11:33:16 +00:00
Matthew Russotto
3d765f7bb7 SERVER-71094 Increase log level for 'Voted yes in election' to (debug) 1
(cherry picked from commit 8ec9c42faa)
2022-12-01 17:52:07 +00:00
Pierlauro Sciarelli
91e38b0d70 SERVER-71666 Reduce number of scanned index entries on chunk migration commit
(cherry picked from commit 591bce5984)
2022-11-30 22:19:11 +00:00
Matthew Russotto
0784db07f2 SERVER-71139 Ensure indexes with simple collation are created correctly during initial sync
This changes the core collation test to leave its collections around after the test.
             The initialsync core passthrough will then cover this scenario.

(cherry picked from commit dcd18cacc2)
(cherry picked from commit 37c1feb59e)
2022-11-30 20:05:24 +00:00
Mindaugas Malinauskas
15efdbab0a SERVER-71568 Fix race condition related to access to ChangeStreamOptions
(cherry picked from commit 92d8c8e3aa)
2022-11-30 14:16:59 +00:00
Sulabh Mahajan
4b00c5844d SERVER-66920 Fix assertion that didn't expect exact match for seek cursor
(cherry picked from commit f2678ea365)
2022-11-29 18:31:31 +00:00
Pol Pinol Castuera
48476ee2af SERVER-68576 Added number of sharded collections to serverStatus command. 2022-11-29 09:07:08 +00:00
Louis Williams
7090cf5398 SERVER-68125 Correctly track all memory used during index builds
This allows the Sorter to manage a memory pool that can be used to allocate memory for index builds. Previously, we relied on each key to report its individual memory usage, but there are some cases where we fail to represent the actual memory used by all keys because the memory was backed by a shared buffer. This new memory pool holds references to all of the buffers it allocates and does not free them until the caller requests so, in this case when the sorter spills to disk.

This strategy keeps the performance the same for index builds without many duplicate keys (due to repeated array values). In the degenerate case where we're building an index with very large duplicate keys, we will end up with more spilling than we had before, at the cost of correctly tracking our memory usage.
2022-11-25 16:11:46 +00:00
Silvia Surroca
a71e6f8214 SERVER-70973 Balancer should stop iterating collections when there are no more available shards 2022-11-25 14:58:37 +00:00
Jeff Zambory
3568ba71bb SERVER-71473: Begin using the new test stats location 2022-11-24 14:30:25 +00:00
Pol Pinol Castuera
1557a827b0 SERVER-71477 Check '_internalAllCollectionStatsSpec.getStats()' exists before calling 'makeStatsForNs' 2022-11-24 08:20:16 +00:00
Mikhail Shchatko
637fb52801 Revert "SERVER-71473: Begin using the new test stats location"
This reverts commit 200257e2ce.
2022-11-23 16:59:27 +00:00
Shin Yee Tan
06729d7c86 SERVER-60455 serverStatus metrics for external sorter
(cherry picked from commit dc6803c670)
2022-11-23 13:55:00 +00:00
Jeff Zambory
200257e2ce SERVER-71473: Begin using the new test stats location
(cherry picked from commit 81b9c1abbc)
2022-11-23 10:45:56 +00:00
Alexander Neben
605d9ce643 SERVER-71534 Fixed fuzzer linting scripts
(cherry picked from commit abb9e21146)
2022-11-23 00:30:55 +00:00
Billy Donahue
589d28dbe5 SERVER-66466 TransportLayerASIOTest remove ThreadContext
(cherry picked from commit df9f792d75)
2022-11-22 18:36:18 +00:00
Yuhong Zhang
55764dfbc0 SERVER-69874 Execute in dryRun mode first during unique index conversion on a sharded collection to ensure consistent index specs across shards
(cherry picked from commit 78131d8e3d)
(cherry picked from commit b3268a6f0b)
2022-11-21 19:41:55 +00:00
Mikhail Shchatko
8683d7af18 SERVER-71518 Use S3 test stats in mongo-task-generator
(cherry picked from commit f590e94413)
2022-11-21 19:06:58 +00:00
Alexander Neben
9a15a92ffb SERVER-71471 Fixed deployment process for jstestfuzz
(cherry picked from commit 45400e2540)
2022-11-21 18:29:43 +00:00
Alexander Neben
7e202c0d33 SERVER-71424 Excluded third_party js files from linting
(cherry picked from commit be0adb109b)
2022-11-21 18:29:43 +00:00
Pierlauro Sciarelli
df0069fbb1 SERVER-71435 Increse verbosity level for range-deleter in resmoke 2022-11-21 14:57:10 +00:00
Max Hirschhorn
4c0d9f3d13 SERVER-69944 Switch to use Python's built-in recursive glob support.
When splitting a path of the form "a/*/b/**", globstar.iglob() would
previously have attempted to walk "a/*" as a literal directory instead
of expanding the glob pattern into a list of directories and walking
each of them.
2022-11-17 13:24:22 +00:00
Pol Piñol Castuera
841b110f72 SERVER-68769 If the shard key index cannot be dropped, it cannot be hidden. 2022-11-17 08:32:23 +00:00
Trevor Guidry
72063954fe SERVER-63104 add resmoke argument for generating all_feature_flags.txt locally
(cherry picked from commit 22f38cf147)
2022-11-16 23:35:15 +00:00
Gregory Noma
94a97b66b4 SERVER-71191 Unlock and relock RSTL during index build setup
(cherry picked from commit f1203e5553)
2022-11-16 18:53:44 +00:00
Gregory Noma
8e7ed54e64 SERVER-71055 Update stable timestamp in OplogOrder test
(cherry picked from commit 9eb32dfc24)
2022-11-16 16:07:42 +00:00
Adityavardhan Agrawal
2a8e2affe2 SERVER-70158 Specify argument evaluation order in generateTrigExpressionBinary
(cherry picked from commit fb7df9a15a)
2022-11-16 02:03:38 +00:00
Gregory Noma
53df6dcf73 SERVER-71167 Abort transactions in txn_index_catalog_changes.js
(cherry picked from commit 35c314ab1a)
2022-11-15 22:47:48 +00:00
Vesselina Ratcheva
7b4d0c59a2 SERVER-69497 Use batchsize 1 in internal_sessions_reaping_basic.js
(cherry picked from commit ad87c2153e)
2022-11-15 21:41:07 +00:00
Randolph Tan
e8ee517f32 SERVER-68361 Make migration properly handle cases when shard key value modification also results to changes in chunk membership
(cherry picked from commit 2061d2244c)
2022-11-14 17:46:38 +00:00
Sergi Mateo Bellido
88f523290d SERVER-71092 Fixing a sharding test 2022-11-11 14:24:30 +00:00
dylrich
94479cfe79 SERVER-71249: set .publish tasks to always run on rhel80-small 2022-11-10 20:23:43 +00:00
Hugh Tong
1f9242481c SERVER-60829 Disallow abort token to cause tenant migration abort after local commit 2022-11-09 20:33:24 +00:00
Antonio Fuschetto
024a3693d8 SERVER-70793 Make database metadata refresh first check new metadata under the IS lock before taking X lock 2022-11-09 17:59:05 +00:00
Varun Ravichandran
d689e62c81 SERVER-69160: Await replication in shards in shardingTest for FCV initialization
(cherry picked from commit c054898179)
2022-11-09 16:50:35 +00:00
Pierlauro Sciarelli
773ab40e91 SERVER-67898 Add chunk size in bytes to BalancerCollectionStatusResponse 2022-11-09 16:11:10 +00:00
Enrico Golfieri
2f3136c12e SERVER-69603 Do not report drop events as part of shardCollection
(cherry picked from commit 22afc187e2)
2022-11-09 10:26:03 +00:00
Adi Zaimi
96352a08d3 SERVER-67795: Add serverstatus counters for updateMany, deleteMany calls (v6.0) 2022-11-09 00:36:21 +00:00
dylrich
f803681c3a SERVER-71089: run push tasks on rhel80-small 2022-11-08 22:52:30 +00:00
Henrik Edin
ac5d0034de SERVER-70879 Fix race where multiple threads are turning an index multikey concurrently
Fix race where the writes to the durable catalog are serialized but the second writer is using a stale in-memory state due to the commit handler not being executed yet. This interleaving does not cause a write conflict as the writes are serialized but the second writer overwrote the multikey paths set by the first writer.

To handle it we always read the latest state from the durable catalog before performing multikey writes. This guarantees that we always are operating on the latest state. Some care was needed to ensure index offsets remain stable.

(cherry picked from commit 74bf9118e3)
2022-11-08 22:05:36 +00:00
Antonio Fuschetto
50e767b1db SERVER-68541 Serialize the removeShard and commitMovePrimary commands to prevent the loss of moved collections 2022-11-08 18:31:34 +00:00
Alya Berciu
7e3381f8a2 SERVER-70436 Handle covered $or null queries with regex 2022-11-08 17:13:58 +00:00
nandinibhartiyaMDB
d8329fbe00 SERVER-71112: Fix resharding failures count in unittest 2022-11-07 22:42:58 +00:00
Daniel Moody
7f22f97737 SERVER-70843 fix scons metrics reporting when scons cache is not in use.
(cherry picked from commit d0c05f39f0)
2022-11-07 15:33:13 +00:00
Gregory Noma
bb65f34a57 SERVER-70725 Narrow errors resulting in CollectionUUIDMismatch in cluster aggregate
(cherry picked from commit 85a50585a0)
2022-11-04 20:27:17 +00:00
Denis Grebennicov
6a5faba612 SERVER-70274 Improve performance of change stream pre-images purging job by leveraging EOF filter 2022-11-04 17:41:12 +00:00
Silvia Surroca
826697fdc3 SERVER-70602 Handle faulty balancerCompliant reporting by waiting for some no-op balancing rounds
(cherry picked from commit 8e7978fb75)
2022-11-04 09:12:33 +00:00
nandinibhartiyaMDB
fed6f5b5c4 SERVER-70373: Avoid invariant failure while aborting a resharding operation 2022-11-03 13:24:21 +00:00
Adi Zaimi
15881bec89 SERVER-69897: omit running internal_transactions_setFCV.js 2022-11-02 23:08:25 +00:00
Jeff Zambory
ef6c47b000 SERVER-69353 Generate burn-in tasks separately 2022-11-02 17:21:28 +00:00
winstonzmdb
7dec7aa4d9 SERVER-62301 Platform Support: Add support for Ubuntu 22.04 ARM 2022-11-02 17:20:09 +00:00
t.ward
a5fa8e8e7a SERVER-62302 BACKPORT-13745 Platform Support: Add support for RHEL9 x86 2022-11-02 16:40:44 +00:00
Daniel Gottlieb
b2a4d5da76 SERVER-69001: Have initial sync persist its last oplog time into the minvalid document.
(cherry picked from commit ff2fffdf49)
(cherry picked from commit 14b1ea6d58)
2022-11-01 20:43:54 +00:00
Dan Larkin-York
ae1522d4b1 SERVER-70314 Adjust time series extended range tests to account for log retention limitations 2022-11-01 20:06:19 +00:00
Luke Chen
59320e91cb Import wiredtiger: 34136bb7914272cc2d9705744ae28bdb373a8781 from branch mongodb-6.0
ref: c01e34c7a2..34136bb791
for: 6.0.3

WT-9792 Fix RTS to remove globally visible update of the data store update from the history store (#8261) (#8429)
2022-11-01 05:01:45 +00:00
Luke Chen
cf5960442d Import wiredtiger: c01e34c7a23abf8b0da9a7ef1ee2a7c5cfc1b7ae from branch mongodb-6.0
ref: 13306c3517..c01e34c7a2
for: 6.0.3

WT-9926 Remove backup file after recovery checkpoint. (#8316) (#8428)
2022-11-01 05:01:45 +00:00
Tommaso Tocci
4645125b6c SERVER-70864 Get rid of fine-grained range deleter lock
(cherry picked from commit 5fc0b006e4362f80a449dffb2a5ff0039d80817b)
2022-11-01 02:18:51 +00:00
Tausif Rahman
da6372ff24 SERVER-70959 Remove retryable_writes_downgrade_last_continuous_gen task for 6.0 2022-10-31 20:24:44 +00:00
Celina Tala
98294fb90a SERVER-69868 Return ShutdownStatus When Starting a Shutdown TransportLayer
(cherry picked from commit 29006706c1)
2022-10-31 16:07:37 +00:00
Pol Pinol Castuera
5048c43f10 SERVER-69773 Fix entire json comparison from $_internalAllCollectionStats testing
(cherry picked from commit 9ef93f7834)
2022-10-31 10:23:54 +00:00
Silvia Surroca
a88f2994dd SERVER-69136 Tests should consider balancerCollectionStatus may report balancerCompliant too early
(cherry picked from commit cf6316677c)
2022-10-30 17:47:05 +00:00
Sergi Mateo Bellido
5fcda91f30 SERVER-70381 Creating auxiliary library with the ShardFilterer
(cherry picked from commit 83db85a8e2)
2022-10-30 14:19:46 +00:00
Matthew Russotto
6c1b9191fd SERVER-69861 Uninterruptible lock guard in election causes FCBIS to hang
Support for reading last vote in data_replicator_external_state

(cherry picked from commit 810d5c1f2b)
2022-10-28 19:13:33 +00:00
Juan Gu
ea921842b9 SERVER-67681 Create specific target for compile commands
(cherry picked from commit 3a31638a3c)
2022-10-28 16:45:31 +00:00
Juan Gu
740e023713 SERVER-67681 Create specific target for compile commands
(cherry picked from commit 5678e6188e)
2022-10-28 16:45:31 +00:00
Reo Kimura
cd1d537822 SERVER-69926 errorcodes.py doesn't detect duplicate errors in MONGO_UNREACHABLE_TASSERT
(cherry picked from commit 0d12c83b9b)
2022-10-27 18:34:27 +00:00
Blake Oler
8ba4a2292f SERVER-70361 Prevent crash due to duration overflow in waitForConditionOrInterruptNoAssertUntil()
(cherry picked from commit 2de14f9eec)
2022-10-27 17:30:45 +00:00
Ryan Egesdahl
a0fa1b34d9 SERVER-70181 Fix Debian default mongod.conf
(cherry picked from commit 56441edbc2)
2022-10-27 16:23:29 +00:00
Paolo Polato
6635037939 SERVER-70852 Recommit SERVER-66716 on v6.0 2022-10-27 11:15:45 +00:00
Alexander Neben
a589023c34 SERVER-62201 Backport removed tests to 6.0 2022-10-25 19:22:12 +00:00
Shreyas Kalyan
6b9f725715 SERVER-70559 tag FLE2 tests such that they do not run with stepdown suites
(cherry picked from commit 25ea623a18)
2022-10-25 18:01:44 +00:00
Alberto Massari
e7571d00d0 SERVER-60141 Upgrade timelib to version 2022.02 2022-10-25 15:47:40 +00:00
Trevor Guidry
ddf194c913 SERVER-69507 only set rpath when link-model is dynamic
(cherry picked from commit eff572b7c1)
2022-10-24 15:27:38 +00:00
t.ward
d69115cf6b SERVER-62300 BACKPORT-13546 Platform Support: Add support for Ubuntu 22.04 x86 2022-10-21 22:54:02 +00:00
Yuhong Zhang
806ff53068 SERVER-69429 Check shard key compatibility during collMod convert to unique
(cherry picked from commit 12165e687b)
2022-10-21 19:42:42 +00:00
Yuhong Zhang
220b590ded SERVER-69429 Check shard key restriction for indexes with prepareUnique option
(cherry picked from commit bef1987c88)
2022-10-21 19:42:42 +00:00
Pierlauro Sciarelli
6acd4526ec SERVER-68484 Increase threshold to consider a collection balanced in balancing_based_on_size.js 2022-10-20 14:47:08 +00:00
Will Buerger
b1a5204dda SERVER-69446: Increase electionTimeoutMillis in jstests/replsets/dbcheck_write_concern.js 2022-10-20 14:12:59 +00:00
jasurbeknurboyev
84921b2016 SERVER-70251 [v6.0] Update task with its _gen version on windows build variants 2022-10-19 21:47:21 +00:00
Ben Shteinfeld
aa45daf78e SERVER-62760 Implement CQF Query Logging 2022-10-19 21:13:05 +00:00
Mark Benvenuto
e85d439a67 SERVER-70469 Use virtual env python in watchdog tests
(cherry picked from commit 669ac94492)
2022-10-19 15:24:52 +00:00
julianedwards
d261b3f5ed SERVER-70483 Pass task execution to Logkeeper 2022-10-17 19:15:19 +00:00
David Storch
b8ee98e803 SERVER-70190 Fix ExpressionSwitch::optimize() to manage _children vector correctly
(cherry picked from commit 2cc7da28b9)
2022-10-17 15:24:35 +00:00
Matt Kneiser
cdbfe8cdae SERVER-69784 Fix signed char misuses
(cherry picked from commit 1912e879e9)
2022-10-14 18:49:21 +00:00
nandinibhartiyaMDB
a67309066f SERVER-69756: Abort a resharding operation immediately.
(cherry picked from commit befe8bb9cf)
2022-10-14 17:48:37 +00:00
galon1
199173d18b SERVER-63811 Add check so documents stage runs when db does not exist 2022-10-14 17:13:05 +00:00
anjani.bhat
cf440fb865 SERVER-70484: Remove signal processing module from perf.yml and sys_perf.yml
(cherry picked from commit 468501d46a)
2022-10-14 14:17:41 +00:00
Pierlauro Sciarelli
a9a07dc8de SERVER-66913 make configureCollectionBalancing() return NamespaceNotSharded on failure + allow calling configureCollectionBalancing interally 2022-10-14 13:34:33 +00:00
Pierlauro Sciarelli
7855723830 SERVER-67813 Review "requires_fcv_61" tags when data size aware balancing lands in v6.0 2022-10-14 13:34:33 +00:00
Silvia Surroca
74d6780ecb SERVER-67301 Balancer may perform one unnecessary migration for a completely balanced collection 2022-10-14 13:34:33 +00:00
Tommaso Tocci
3ad9ad11ba SERVER-67733 ShardingTest::awaitBalancerRound() doesn't work in case of CSRS stepdowns 2022-10-14 13:34:33 +00:00
Pierlauro Sciarelli
0bfc290b10 SERVER-67809 Execute insert_with_data_size_aware_balancing.js in stepdown suites 2022-10-14 13:34:32 +00:00
Paolo Polato
ceeb5b9847 SERVER-67346 Disable autosplit on config.system.sessions when upgrading the cluster 2022-10-14 13:34:32 +00:00
Allison Easton
9f9fd512dd SERVER-57417 Enable NoMoreAutoSplitter Feature flag 2022-10-14 13:34:32 +00:00
Allison Easton
6d75a1d04f SERVER-66781 Enable BalanceAccordingToDataSize feature flag 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
dc846d69a6 SERVER-66835 Compare number of chunks in balancing_based_on_size.js 2022-10-14 13:34:32 +00:00
Paolo Polato
e316e3a005 SERVER-66078 Make config.system.sessions balanceable by data size criteria 2022-10-14 13:34:32 +00:00
Allison Easton
9f741ad493 SERVER-64319 Fix the name hiding issue for usages of ShardingCatalogManager::withTransaction 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
0789147467 SERVER-66827 Balancer must not skip round if a collection has balacing disabled 2022-10-14 13:34:32 +00:00
Kaloian Manassiev
194b488a89 SERVER-66753 Use 64-bit integer in the balancer policy minSize counter 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
5d82bd7ada SERVER-66747 Increase deadline to wait for balancing in jstests/sharding/authCommands.js 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
dd06d401ba SERVER-66208 remove non-existing excluded tests from sharding_continuous_config_stepdown.yml 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
b790445018 SERVER-66208 Remove chunk creation for shard collection with existing data
Co-authored-by: Kaloian Manassiev <kaloian.manassiev@mongodb.com>
2022-10-14 13:34:32 +00:00
Allison Easton
5a2493469f SERVER-63668 Guard the chunk splitter behind the no more auto-splitter feature flag 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
81d4055995 SERVER-66378 Adapt tests skipped due to featureFlagBalanceAccordingToDataSize 2022-10-14 13:34:32 +00:00
Pierlauro Sciarelli
7b450643b3 SERVER-65816 Change balancer policy to balance on data size rather than number of chunks 2022-10-14 13:34:32 +00:00
Allison Easton
83e3601a31 SERVER-66834 Zones created by defragmentation_util.js must always align with chunks
(cherry picked from commit 9dee997bd1)
2022-10-14 12:19:40 +00:00
Sergi Mateo Bellido
f923ca7045 SERVER-69134 Adding a way to clear the metadata manager
(cherry picked from commit fa94f5fb62)
2022-10-13 12:56:12 +00:00
Silvia Surroca
480068f037 SERVER-67891 SERVER-69465 SERVER-68249 SERVER-69069 Sharded data distribution info API 2022-10-13 09:04:39 +00:00
Andrew Morrow
0f665ae234 SERVER-70475 Cherry pick signed integer compairson warning from newer boost on master 2022-10-13 01:39:02 +00:00
Aaron Morand
6ebdd6e68b SERVER-64834 Updating man pages for 6.0
(cherry picked from commit 835f3e043c)
2022-10-12 21:07:11 +00:00
Aaron Morand
440362f180 SERVER-67619 Increase the build frequency of the s390x variant
(cherry picked from commit 524f727fb4)
2022-10-12 20:13:19 +00:00
Abdul Qadeer
f840d83bc5 SERVER-70364 Retry once on network error
(cherry picked from commit 95dfa466a6)
2022-10-12 19:03:20 +00:00
Mark Benvenuto
77b9639384 SERVER-70170 Update ssl_helpers.js for Amazon 2022
(cherry picked from commit a2148a8a75)
2022-10-11 20:17:07 +00:00
anjani.bhat
92cb95c060 SERVER-70299: Remove json.send command usage 2022-10-10 20:05:11 +00:00
Antonio Fuschetto
29c8d88c97 SERVER-69898 Wait for the critical section catch-up phase before refreshing the DB version 2022-10-07 13:36:06 +00:00
Antonio Fuschetto
41d01f91c0 SERVER-69930 Unexpected error message in the logs attempting to refresh the version of a dropped database 2022-10-07 09:06:50 +00:00
Nicholas Zolnierz
ce865dfc67 SERVER-69380 Avoid swapping meta projection with $_internalUnpackBucket if a projection has already been absorbed
(cherry picked from commit d1a117a1ab)
2022-10-06 20:46:07 +00:00
Adityavardhan Agrawal
5797fb0282 SERVER-67324: wrap replSetSetup cmd in assert.soon 2022-10-06 20:10:57 +00:00
Christopher Caplinger
da6982aa14 SERVER-67739: Fix tenant migration garbage collection race conditions 2022-10-06 18:55:01 +00:00
Denis Grebennicov
26350ca57b SERVER-68233 MongoShell numberDecimalsAlmostEqual(NumberDecimal(0), NumberDecimal(0)) returns false 2022-10-06 16:59:29 +00:00
Alexander Ignatyev
19912e29a7 SERVER-69929 Skip Strict API testing if required feature flag is not enabled 2022-10-06 12:26:16 +00:00
Sanika Phanse
c3932575cb SERVER-67466 Internal transactions API may be memory unsafe when outer OperationContext is interrupted 2022-10-06 02:34:40 +00:00
Spencer Jackson
49297c3cb0 SERVER-69348 Remove repairDatabase command
(cherry picked from commit fa534d676f)
2022-10-05 18:54:02 +00:00
Jordi Olivares Provencio
6b95c30295 SERVER-68893 Remove unnecessary TicketHolder benchmarks 2022-10-05 14:08:09 +00:00
Tausif Rahman
eff05a5add SERVER-69912 SConstruct is executable by mistake
(cherry picked from commit d22d68c4c2)
2022-10-04 14:41:51 +00:00
Gregory Noma
8839b9fe60 SERVER-69389 Populate shadow collection catalog on clean shutdown
(cherry picked from commit 5457b45279)
2022-10-04 13:52:02 +00:00
Antonio Fuschetto
353d35df77 SERVER-69444 Make the joining of concurrent critical section and refresh look the same between DSS and CSS 2022-10-04 07:16:21 +00:00
Mihai Andrei
c172ccd375 SERVER-66289 Update write size estimation logic in DocumentSourceWriter
(cherry picked from commit 707ba0a0ad)
2022-10-04 01:06:24 +00:00
Alexander Neben
072d2d4bac SERVER-69281 Force minimum ninja version 2022-10-03 20:07:18 +00:00
xudyang1
7cef34d8a1 SERVER-67793 Change log_progress_msg to show output in Ubuntu
`log_progress_msg` does not print any message in Ubuntu-20.04.4 LTS in WSL. In file `/lib/lsb/init-functions.d/50-ubuntu-logging`, the function `log_progress_msg () { : }` does nothing. To show the output, `log_success_msg` and `log_failure_msg` could be good alternatives.

Closes https://github.com/mongodb/mongo/pull/1474

Signed-off-by: Ryan Egesdahl <ryan.egesdahl@mongodb.com>
(cherry picked from commit cad54eb5eb)
2022-10-03 19:03:58 +00:00
Ryan Egesdahl
0f5315f95e SERVER-66525 Fix errexit prevents printing pip log
(cherry picked from commit d1dde8caac)
2022-10-03 19:03:58 +00:00
Kyle Suarez
6770ec060b SERVER-69037 fix incorrect calculation of bytes in MiB
(cherry picked from commit d743e0d165)
2022-10-03 17:58:33 +00:00
Jacob Evans
62271b8469 SERVER-68371 Allow search queries to pass through query analysis 2022-10-03 16:11:56 +00:00
Pierlauro Sciarelli
e98cf03caf SERVER-66916 Make rangeDeleterBatchSize and rangeDeleterBatchDelayMS dynamically configurable 2022-10-03 12:28:50 +00:00
Antonio Fuschetto
546af4aa74 SERVER-66972 Database critical section does not serialize with ongoing refreshes 2022-10-03 08:04:19 +00:00
Ryan Egesdahl
cded42a212 Revert "SERVER-69927 Fix benchmark analysis"
This reverts commit c530c88d739e4e0cffd54ebbebf2dbe3fcd981df.
2022-10-01 02:54:01 +00:00
Faustoleyva54
9a0795c7bd SERVER-68394 Ensure we do not yield strong locks upon startup recovery when _id index is missing 2022-09-30 18:41:12 +00:00
Ryan Egesdahl
55ece4d678 SERVER-69927 Fix benchmark analysis
(cherry picked from commit 2b311888e9)
2022-09-30 17:28:18 +00:00
joshua
d91d1f7ae7 SERVER-68115 Do not drop empty path component from elemMatch path during index selection 2022-09-30 16:33:19 +00:00
Kyle Suarez
fe98d0249a SERVER-67715 escape $changeStream regex
(cherry picked from commit c9fe899fff)
2022-09-30 15:48:15 +00:00
Uladzimir Makouski
814ad52532 Revert "SERVER-66289 Update write size estimation logic in DocumentSourceWriter"
This reverts commit dff46e9243.
2022-09-30 15:16:05 +00:00
Gregory Noma
041b13dcae SERVER-65191 Run StorageEngineRepairTest with wiredTiger 2022-09-30 09:22:49 +00:00
Jordi Olivares Provencio
707c625588 SERVER-66614 Run Unit Tests with ephemeral WiredTiger by default 2022-09-30 09:22:49 +00:00
Daniel Moody
8692dd1520 SERVER-69133 remove redundant setting of hardlink install action.
(cherry picked from commit c1adfd31df)
2022-09-30 04:19:07 +00:00
Daniel Moody
80d49ccf6a SERVER-48203 add precious and link-type install actions to ninja
(cherry picked from commit 0054d395a5)
2022-09-30 04:19:07 +00:00
Gregory Wlodarek
043e1552f1 SERVER-60753 Skip removing index build entries explicitly from 'config.system.indexBuilds' when recovering from the oplog as a standalone
(cherry picked from commit c7f9bb9676)
2022-09-30 03:39:13 +00:00
Mihai Andrei
dff46e9243 SERVER-66289 Update write size estimation logic in DocumentSourceWriter
(cherry picked from commit 7b7fe658db)
2022-09-29 23:18:17 +00:00
Abdul Qadeer
304ce9043c SERVER-69700 Await secondaries' readiness
(cherry picked from commit 6eaf0ea0d0)
2022-09-27 16:43:28 +00:00
Abdul Qadeer
ff4dddb193 SERVER-68869 Wait for retried _configsvrReshardCollection cmd
(cherry picked from commit a2b63a5e8d)
2022-09-27 15:59:06 +00:00
nandinibhartiyaMDB
e886b9117e SERVER-68139: Test resharding success with limited memory
(cherry picked from commit 901ce6eed0)
2022-09-21 14:35:11 +00:00
Jordi Olivares Provencio
26ee6d9d3c SERVER-69849 Delete FifoBasicMetrics test 2022-09-21 11:03:25 +00:00
Nikita Lapkov
ba3b22c58d SERVER-69793 Disable memory underflow check in the query system
(cherry picked from commit 4d58e73a53)
2022-09-21 08:55:46 +00:00
Matt Boros
94fb7dfc8b SERVER-69005 $internalBoundedSort should not accept empty sort pattern
(cherry picked from commit a14ebbf41e)
2022-09-20 16:07:35 +00:00
Mickey. J Winters
0da3dac395 SERVER-69785 robustify change_streams_per_shard_cursor.js
(cherry-picked from 1219ff764c)
2022-09-20 14:55:25 +00:00
Luke Chen
6ef16f7c62 Import wiredtiger: 13306c3517a9731ad2cf580aca262c29a5a7895d from branch mongodb-6.0
ref: 58159b1a09..13306c3517
for: 6.0.2

WT-9870 Fix the global time window state before performing rollback to stable (6.0 backport) (#8284)
2022-09-20 02:26:07 +00:00
Luke Chen
616e1e0a7a Import wiredtiger: 58159b1a09bc045ab956b40675212e01d91fa7c0 from branch mongodb-6.0
ref: bfc6fc15de..58159b1a09
for: 6.0.2

WT-9599 Acquire the hot backup lock to call fallocate in the block (#8212) (#8249)
2022-09-20 02:26:06 +00:00
Luke Chen
353d73795b Import wiredtiger: bfc6fc15de632da2000143bcce3a23141cfc6a2c from branch mongodb-6.0
ref: 3ecab025d4..bfc6fc15de
for: 6.0.2

WT-9763 Return EBUSY if the time window of inserting record does not match with history store time window (#8218) (#8246)
2022-09-20 02:26:06 +00:00
Luke Chen
f54345ed7e Import wiredtiger: 3ecab025d4c0a337fe80b6fe55538896c43c159e from branch mongodb-6.0
ref: 3ab8999188..3ecab025d4
for: 6.0.2

WT-9323 Fix a race tracking whether a tree has updates after a checkpoint (#8194) (#8228)
2022-09-20 02:26:06 +00:00
Josef Ahmad
da08215791 SERVER-69611 Set the -ffp-contract=off compiler option by default
(cherry picked from commit d8901a2835)
2022-09-19 23:04:49 +00:00
Yoonsoo Kim
52940805f0 SERVER-69707 Fix undefined slot error for $group with conditional expression
(cherry picked from commit 8e990303de)
2022-09-16 21:41:13 +00:00
Tausif Rahman
787238e02e SERVER-68003 Make experiment_unified_ninja.vars the default
(cherry picked from commit 41d0a45aaf)
(cherry picked from commit 6e2d63630e)
2022-09-16 15:19:57 +00:00
Adam Rayner
f7f6c69283 SERVER-68548: Backport - check quiet globalServerParam before logging 2022-09-16 14:48:48 +00:00
Henrik Edin
fc0a572b03 SERVER-67402 Fix race where linearizable read concern may read during primary catchup
(cherry picked from commit f62d857f44)
2022-09-15 17:27:33 +00:00
Alexander Neben
3e661ebcc1 SERVER-69590 Fixed clang arm compiles
4e9596735f
This is the commit for the corresponding change to mongo-forks
2022-09-15 15:30:30 +00:00
Kaloian Manassiev
d44e33b032 SERVER-68890 Remove error code conversions in the MigrationSourceManager commit path
(cherry picked from commit f4346f270a)
2022-09-15 10:53:40 +00:00
Antonio Fuschetto
9d97bffb2e SERVER-69108 SCCL can immediately return config and admin metadata without triggering a refresh 2022-09-15 07:41:49 +00:00
Andrew Witten
1db7b70c4f SERVER-67653 don't initiate critical section if remainingMillis is omitted
(cherry picked from commit abd6330d79)

SERVER-69693 Use lambda instead of repeating code in resharding coordinator
2022-09-14 21:26:12 +00:00
nandinibhartiyaMDB
fadf5a9770 SERVER-68094: Use $replaceRoot instead of $project
(cherry picked from commit 015dc2badc)
2022-09-14 20:30:44 +00:00
Josef Ahmad
899fb0a1ad SERVER-67538 Make multi-doc txns return WCE on index catalog changes
Background: SERVER-47866 stopped bumping the collection's minimum
visibility timestamp on catalog changes related to an index; only the
index's minimum visibility snapshot continues to be updated. One side
effect of this change is that a multi-document transaction can read a
at a snapshot where the index is not yet ready and commit at a
timestamp when the index is ready, which not intended behaviour and
can open the opportunity for a race to happen.

This patch introduces a check for the indices' minimum visible timestamp.
Attempting to write to an index entry while reading at an incompatible
timestamp returns a write conflict exception. Locking rules guarantee that
we see a consistent in-memory view of the indices' minimum visible
snapshot.

(cherry picked from commit a4bd3ce360)
2022-09-14 17:49:03 +00:00
Sara Golemon
5ffb53b33d SERVER-67787 Retry ops in auth concurrency tests
(cherry picked from commit 51b7a812dd)
2022-09-14 14:59:26 +00:00
Sergi Mateo Bellido
c94a993632 SERVER-64730 Interrupt ongoing refreshes after entering into the critical section
(cherry picked from commit 343108041c)
2022-09-14 08:35:19 +00:00
Brett Nawrocki
fdf878f2d2 SERVER-67916 Fix semantics of cancelWhenAnyErrorThenQuiesce
(cherry picked from commit 8ea6245638)
2022-09-13 20:17:04 +00:00
Ryan Egesdahl
1451ddccfc SERVER-60551 Fix mongo (shell) initializer stages
(cherry picked from commit 72344e39ac)
2022-09-13 19:26:50 +00:00
Varun Ravichandran
c9d1d2ffdb SERVER-69167: Verify that FCV has been initialized before cluster parameter feature flag checks 2022-09-13 19:25:37 +00:00
Mark Benvenuto
aa13d918e5 SERVER-69006 Remove FLE2 suites out of hedged reads passthrough
(cherry picked from commit 9c604c3daf)
2022-09-12 20:50:17 +00:00
Sergi Mateo Bellido
2ef7e19c54 SERVER-69207 Coverity fix use after move
(cherry picked from commit 310dd9f04a)
2022-09-12 12:22:46 +00:00
Enrico Golfieri
80e78ce715 SERVER-69220 refineCollectionShardKey permits toggling current shard key fields between range-based and hashed, leading to data inconsistency 2022-09-12 09:31:21 +00:00
Benety Goh
3bf0d522db SERVER-68477 createIndexes overwrites NaN expireAfterSeconds before starting index build
(cherry picked from commit 58796facf4)
2022-09-11 18:36:57 +00:00
Benety Goh
aab9685c53 SERVER-68477 TTLMonitor fixes NaN expireAfterSeconds on TTL indexes during step up
(cherry picked from commit b8eb75f99a)
2022-09-11 18:36:57 +00:00
Benety Goh
17d15eb7f3 SERVER-68477 remove epoch restriction on ttl indexes
(cherry picked from commit eb2f7f03f8)
2022-09-11 18:36:57 +00:00
Benety Goh
6a1b08c810 SERVER-68477 listIndexes repairs TTL indexes with NaN expireAfterSeconds
(cherry picked from commit d6528bf96f)
2022-09-11 12:20:07 +00:00
Benety Goh
0f56fdb4c9 SERVER-68477 TTL monitor skips indexes with NaN expireAfterSeconds
(cherry-picked from commit 14c07b5318)

(cherry picked from commit 7d76329f89)
2022-09-11 12:20:07 +00:00
Benety Goh
26fc0d8a01 SERVER-68477 add startup warning for TTL indexes with NaN 'expireAfterSeconds'
(partially cherry-picked from commit abdedd367e)

(cherry picked from commit 5d21e0115e)
2022-09-11 12:20:07 +00:00
Benety Goh
02a6f50be2 SERVER-68477 add TTLMonitor::onStepUp()
(cherry picked from commit 3b17e5f791)
2022-09-10 18:02:42 +00:00
Benety Goh
2a53498a27 SERVER-68477 include 'expireAfterSeconds' type information when registering TTL indexes with the TTLCollectionCache
(cherry picked from commit cc3ae631bc)
2022-09-10 18:02:42 +00:00
Benety Goh
8c2aec279f SERVER-68477 add unit test for TTLCollectionCache
(cherry picked from commit f32f550aff)
2022-09-10 18:02:42 +00:00
Yuhong Zhang
a02d3716c2 SERVER-64444 SERVER-64877 Add unittests for repairing index specs
(cherry-picked from commit a59e32ba38)
2022-09-10 18:02:42 +00:00
Daniel Moody
b49a00057e SERVER-68637 disable cache metrics for static hosts
(cherry picked from commit 3af863123f)
2022-09-09 21:38:22 +00:00
Nicholas Zolnierz
a8f941b736 SERVER-68790 Avoid setting internalQueryFrameworkControl on 6.0 2022-09-09 18:30:42 +00:00
Jeff Zambory
26985e5ca9 SERVER-69569: Pin cryptography version 2022-09-09 17:36:18 +00:00
Jordi Olivares Provencio
a2a4315b39 SERVER-66436 Fix initialisation errors in DConcurrencyTest benchmarks 2022-09-05 17:02:44 +00:00
Yu Jin Kang Park
9cf479fb36 SERVER-67846 Add requires_fcv_60 tag to tests querying featureFlagCollModIndexUnique
(cherry picked from commit 4dcb8f0e55)
2022-09-05 13:16:52 +00:00
Jeff Zambory
e3cba25b20 SERVER-69376: Increase timeout for replica_sets_jscore_passthrough on macos variant
(cherry picked from commit eda796994e)
2022-09-03 00:48:05 +00:00
Shreyas Kalyan
dfb7dc8631 SERVER-66554 Make FLE2 suites work with stepdown and kill_primary suites
(cherry picked from commit 2c701bf035)
2022-09-02 17:01:12 +00:00
Daniel Moody
2ca8e21c41 SERVER-68475 use debug-types-section to reduce debug info
(cherry picked from commit b41c85c2e7)
2022-09-01 23:15:21 +00:00
Randolph Tan
ce6648c846 SERVER-69290 - Disable sharding/refine basic test in 6.0 2022-08-31 23:48:09 +00:00
David Storch
0d06938ab1 SERVER-69103 Always use the classic engine on the inner side of DocumentSourceLookup or $graphLookup
(cherry picked from commit 331e44c65a)
2022-08-31 21:36:13 +00:00
Mikhail Shchatko
1f173b7e86 SERVER-69265 Increase config_fuzzer_replica_sets_jscore_passthrough timeout
(cherry picked from commit 0cb24e4b94)
2022-08-31 16:38:49 +00:00
Jason Zhang
71801545d0 SERVER-69118 Have retryable findAndModify failover internal transaction test wait until lastCommittedOpTime is recovered after failover
(cherry picked from commit cabbf002ee)
2022-08-31 16:01:51 +00:00
mathisbessamdb
b0bde1c01a SERVER-67194 Replace the logic in our jstest to retry when calling replSetStepUp
(cherry picked from commit 3e3aae871c)
2022-08-31 15:03:13 +00:00
Nicholas Zolnierz
5521f98c39 SERVER-68691 Report variable references for $graphLookup 'restrictSearchWithMatch' filter 2022-08-30 20:23:15 +00:00
Daniel Moody
dbe3923c37 Revert "SERVER-68475 use debug-types-section to reduce debug info"
This reverts commit 26054e1038.
2022-08-30 15:51:58 +00:00
Davis Haupt
5133ed4646 SERVER-68766 add server parameter to enable single value reduce optimization 2022-08-29 19:18:27 +00:00
Gregory Noma
ef2b8ad379 SERVER-69141 Move forward TSBS version
(cherry picked from commit 69c423f89e)
2022-08-29 18:45:44 +00:00
Daniel Moody
26054e1038 SERVER-68475 use debug-types-section to reduce debug info
(cherry picked from commit b41c85c2e7)
2022-08-29 18:44:31 +00:00
Dan Larkin-York
8e4a1a6d60 SERVER-66794 SERVER-67814 SERVER-69052 Detect time-series collections that require extended range support
(cherry picked from commit 800d394a09)
(cherry picked from commit 65002ae2d4)
(cherry picked from commit 97989ceff0)
(cherry picked from commit f374f58e55)
2022-08-29 18:14:53 +00:00
Gregory Wlodarek
d05a7e1e95 SERVER-68925 Reintroduce check table logging settings at startup
(cherry picked from commit 994562a9c8)
2022-08-26 09:50:30 +00:00
Mark Benvenuto
4490f18b1c SERVER-68950 Update ssl_helpers.js for Ubuntu 22.04
(cherry picked from commit 9091d46f1b)
2022-08-25 18:14:58 +00:00
Ryan Egesdahl
22d6f31697 SERVER-69127 Add more missing version expansions
(cherry picked from commit 79662a1b0d)
2022-08-25 03:16:14 +00:00
Tausif Rahman
786c9cb305 SERVER-68586 Use opt setting from Build Profiles
(cherry picked from commit cfbd8f8449)
2022-08-24 20:39:11 +00:00
Andrew Witten
edce02c5c2 SERVER-67280 wrap periodicCheckImpl with try catch
(cherry picked from commit 3e5d353f84)
2022-08-24 16:33:14 +00:00
Ian Boros
edd77b9a40 SERVER-68521 Fix race in awaitdata_getmore.js
(cherry picked from commit c7da70b78f)
2022-08-24 16:03:13 +00:00
Jason Zhang
0c797d4dfe SERVER-68886 Remove extra call to addEagerlyReapedSession in internal transactions reap service unittest
(cherry picked from commit 96debbaa39)
2022-08-24 15:10:25 +00:00
Erwin Pe
bd958b2eb8 SERVER-67909 Skip dropping a non-existent temp ECOC collection in the compact coordinator
(cherry picked from commit 3d49923b38)
2022-08-23 21:22:28 +00:00
Erwin Pe
68f7db659a SERVER-68461 Persist the result of the doCompactOperation in the Pre61Compatible compaction coordinator
(cherry picked from commit ce2913d15a)
2022-08-23 14:30:14 +00:00
Mikhail Shchatko
f6e237006a SERVER-66613 Send binary version instead of evergreen version to symbolizer service
(cherry picked from commit c2f3bb6b7f)
2022-08-23 14:28:56 +00:00
Mikhail Shchatko
d69a2bf1c4 SERVER-65781 Run the symbolizer on CI output
(cherry picked from commit ff67413773)
2022-08-23 13:55:37 +00:00
Gregory Wlodarek
fc231f2e56 SERVER-68694 The compact command should not block oplog application
(cherry picked from commit 10e65755f6)
2022-08-23 10:47:29 +00:00
Gregory Wlodarek
84d18ba8a0 SERVER-68694 Reverse the compact commands locking order
(cherry picked from commit 4b8e1a96fc)
2022-08-23 10:47:28 +00:00
Jordi Serra Torrens
90ae9880af SERVER-65382 Don't use clientReadable in AutoSplitVector when reordering shard key fields
(cherry picked from commit 56dab5c0dc)
2022-08-23 10:16:31 +00:00
Mikhail Shchatko
d9646a90f3 SERVER-68937 Improve task splitting based on historic tests runtime
(cherry picked from commit 59617337e9)
2022-08-23 09:40:06 +00:00
Paolo Polato
a1051719e1 SERVER-68126 Check constraints for maxChunkSize param in auto/splitVector commands
(cherry picked from commit b9f4378d3d)
2022-08-23 08:51:50 +00:00
Mark Benvenuto
8c06dd4e33 SERVER-68399 Fix parsing of safeint version numbers in blackduck_hub.py
(cherry picked from commit 4b9b342772)
2022-08-22 21:27:09 +00:00
Sara Golemon
3b7df5f84d SERVER-68207 Give clusterMonitor explicit permissions to config.system.sessions
(cherry picked from commit 42f5e708fa)
2022-08-22 18:28:40 +00:00
Billy Donahue
466977c16e SERVER-63852 ThreadName rewrite
(cherry picked from commit 568226e1d6)

(Needed to bring more errno_util updates in)
2022-08-19 18:25:51 +00:00
ali-mir
ef4c9bc657 SERVER-68905 Add append_oplog_note_mongos.js to backports_required_for_multiversion_tests.yml under last-lts
(cherry picked from commit e52434d6d1)
2022-08-19 16:30:49 +00:00
Josef Ahmad
42a7061258 SERVER-65435 Increase fuzzer's min eviction_dirty_trigger to 50MB
(cherry picked from commit 2dde408370)
2022-08-19 07:51:16 +00:00
ali-mir
fa5fc0aec4 SERVER-68905 Add append_oplog_note_mongos.js to backports_required_for_multiversion_tests.yml
(cherry picked from commit f7d5fbf777)
2022-08-18 21:36:02 +00:00
Wenbin Zhu
763769f364 SERVER-68441 Exclude collection_uuid_index_commands.js from failover passthrough suites.
(cherry picked from commit 13eeb512c9)
2022-08-18 16:18:44 +00:00
Pierlauro Sciarelli
506c10404a SERVER-67385 Range deletion tasks on primary must not be scheduled before ongoing queries finish
(cherry picked from commit 32c2f632ea)
2022-08-18 08:15:49 +00:00
Mickey. J Winters
8b2300fef3 SERVER-67666 Allow watching system.buckets collections in full cluster change streams 2022-08-17 17:42:13 +00:00
Nikita Lapkov
2b28f7295b SERVER-61281 Use memoization for Document::getApproximateSize
(cherry picked from commit b4ce104d4e)
2022-08-17 16:49:18 +00:00
Gabriel Marks
1e92569b81 SERVER-67126 Don't invoke LOGV2 in printStackTrace(ostream) 2022-08-17 15:12:54 +00:00
Gabriel Marks
9783ab2652 SERVER-63843 Don't allow recursive doLog in sync signal handlers 2022-08-17 15:12:54 +00:00
Gabriel Marks
6192908ab3 Revert "SERVER-63843 Don't allow recursive doLog in sync signal handlers"
This reverts commit 2838764142.
2022-08-16 16:41:44 +00:00
Gabriel Marks
2838764142 SERVER-63843 Don't allow recursive doLog in sync signal handlers 2022-08-16 03:28:56 +00:00
Faustoleyva54
ffe4b7bdd4 SERVER-67679 Fix concurrent collection drops from returning NamespaceNotFound instead of CollectionUUIDMismatch 2022-08-15 14:26:12 +00:00
Henri Nikku
423e9613a5 SERVER-67728 Use FeatureFlagUtil in timeseries jstests
(cherry picked from commit e2d178fba6)
2022-08-15 10:36:31 +00:00
Matt Boros
a0eeb88ef2 SERVER-68501 changed invariant to uassert for direct bounded sort use
(cherry picked from commit 1f93d126c0)
2022-08-12 19:54:20 +00:00
Abdul Qadeer
4343f51e23 SERVER-68728 Add failpoint activation condition for mixed version clusters 2022-08-12 12:35:08 +00:00
Ryan Egesdahl
0c68900f7e SERVER-68568 Override version with future tag
(cherry picked from commit e86809ff70)
2022-08-12 04:09:47 +00:00
Tausif Rahman
017df23da7 SERVER-66804 Remove check_binary_version from test setup
(cherry picked from commit 8c3c18c8d0)
2022-08-12 04:09:47 +00:00
Ryan Egesdahl
713e21b3be SERVER-63191 Fix Windows builds with generated version expansions
(cherry picked from commit 131ea34b9d)
2022-08-12 04:09:47 +00:00
Ryan Egesdahl
6fdbde504f SERVER-63191 Generate build expansions early
(cherry picked from commit 2836afbf9a)
2022-08-12 04:09:47 +00:00
Cheahuychou Mao
48741207ef SERVER-67605 Make retryable_findAndModify_commit_and_abort_prepared_txns_after_failover_and_restart.js not test restart with a 1-node shard
(cherry picked from commit 64d2027a94)
2022-08-12 02:32:47 +00:00
Andrew Witten
bbc0bb5e98 SERVER-67650 persist additional recipient resharding metrics 2022-08-11 14:31:47 +00:00
Tommaso Tocci
2f27abe1ea SERVER-68479 collMod coordiantor V2 must block migration on bucket nss 2022-08-10 15:06:39 +00:00
Tausif Rahman
7b53b8f5fb SERVER-68540 Add docker_incompatible tag for jscore tests
(cherry picked from commit e8f24a2e82)
2022-08-10 13:42:34 +00:00
Sara Golemon
a4ca3f420b SERVER-66726 Fix serialization in killAllSessionsByPattern
(cherry picked from commit cfb45ed82a)
2022-08-09 23:16:22 +00:00
Max Hirschhorn
ff945dd52f SERVER-61035 Increase zones in resharding test for large initial chunks.
(cherry picked from commit 3af355e5ff)
2022-08-09 22:45:19 +00:00
Max Hirschhorn
71c2798d87 SERVER-68495 Update resharded zones after kCommitting transition.
Attempting to update the namespace of the config.tags documents may
otherwise repeatedly fail with a WriteConflict due to WT cache eviction
aborting the transaction.

(cherry picked from commit 41c45d0d07)
2022-08-09 22:45:19 +00:00
Amirsaman Memaripour
05a3cac316 SERVER-65317 TaskExecutorCursor should not cancel prefetching getMores
(cherry picked from commit a7ce4c0c9b)
2022-08-09 18:15:15 +00:00
Enrico Golfieri
c5b3bb366c SERVER-67725 check uuid consistency over all participants for renameCollection 2022-08-09 17:12:37 +00:00
Max Hirschhorn
8e55aa4ae2 SERVER-68628 Refresh routing info on primary during resharding.
The primary of a replica set shard may otherwise have arbitrarily stale
routing information for the source collection and temporary resharding
collection based on the time of its last refresh.

(cherry picked from commit eda2f5d5d9)
2022-08-09 16:29:50 +00:00
Erwin Pe
315375bbda SERVER-66841 Fix LOGV2 invalid JSON when truncation happens at a backslash character
(cherry picked from commit b795776ac3)
2022-08-09 15:46:52 +00:00
Yu Jin Kang Park
6d250687b9 SERVER-67939: run_dbcheck_background.js retry on CappedPositionLost 2022-08-09 15:18:36 +00:00
Silvia Surroca
485be49e71 SERVER-67296 Mark the OpCtx of the configsvr commands used to commit chunk-related DDL ops as interruptible 2022-08-08 18:56:10 +00:00
Tausif Rahman
b8d9c05789 SERVER-68540 Add docker_incompatible tag for jscore tests
(cherry picked from commit 488f1356db)
(cherry picked from commit a1fdb9b117)
2022-08-08 15:18:00 +00:00
Abdul Qadeer
32f1d5772a SERVER-61985 SERVER-67193 Make reshardingPauseCoordinatorBeforeCompletion failpoint pause conditionally
(cherry picked from commit 0d5fd57f9e)
2022-08-05 20:28:39 +00:00
Abdul Qadeer
32f0f9c88d SERVER-68431 Configure test fixture failpoints for all CSRS nodes
(cherry picked from commit c272759ad8)
2022-08-05 16:21:29 +00:00
Pierlauro Sciarelli
ecb435f2b4 SERVER-68511 MovePrimary update of config.databases entry must use dotted fields notation 2022-08-05 15:53:48 +00:00
Zakhar Kleyman
189ed3d291 SERVER-68574 switch resmoke to logkeeper2 2022-08-05 01:54:18 +00:00
Daniel Gottlieb
25b89027b9 SERVER-66027: Reduce CPU contention for the tenant migration stress test.
(cherry picked from commit bcaab458fa)
2022-08-04 18:17:05 +00:00
Abdul Qadeer
89bc2f7533 SERVER-67492 Skip updating txn table for op=n when o2 is empty
(cherry picked from commit 3f6c084520)
2022-08-04 16:24:48 +00:00
Faustoleyva54
c500300c08 SERVER-67885 shardCollection with a mismatched UUID on a capped collection will fail first with InvalidOptions 2022-08-04 14:24:09 +00:00
Mikhail Shchatko
c8ccd380ff SERVER-68526 Use mongo-task-generator that generates tasks separately for Windows, MacOS, Linux distro groups 2022-08-04 13:53:03 +00:00
Gregory Wlodarek
c18b994e50 SERVER-68513 The _configsvrRunRestore command should restore databases with unsharded collections 2022-08-03 21:35:26 +00:00
Matthew Russotto
3433b2931c SERVER-65657 Reduce calls to the cappedInsertNotifier for the oplog
(cherry picked from commit 7aeab9f783)
2022-08-03 17:29:15 +00:00
Jason Zhang
3cf970945f SERVER-68184 Use Number instead of NumberLong when indexing in checkWritesOfCommittedTxns
(cherry picked from commit 4e2b9c4b8f)
2022-08-03 04:24:47 +00:00
Jason Zhang
7a6a977a8c SERVER-67422 Have getAllRemovalFuturesForCoordinatorsForInternalTransactions wait for TransactionCoordinator catalog recovery
(cherry picked from commit fdf1e87a30)
2022-08-03 03:57:24 +00:00
Yoonsoo Kim
83aa49a574 SERVER-68405 Convert Nothing for _id expression in $group to Null
(cherry picked from commit 5f9999beba)
2022-08-03 01:40:35 +00:00
Benety Goh
ad6b4935e1 SERVER-68487 add BSONElement::isNaN()
(cherry picked from commit ed25ebe0d8)
2022-08-02 21:11:37 +00:00
Cheahuychou Mao
e37e36ccd6 SERVER-68443 InternalTransactionChunkMigrationTest and RetryableInternalTransactionTest fixtures should retry internal transactions on all transient errors
(cherry picked from commit 6140491d37)
2022-08-02 16:17:30 +00:00
Benety Goh
65d8919a39 SERVER-67527 add kills_random_sessions to suites/concurrency_replication_for_export_import.yml
(cherry picked from commit 4fb1e801cc)
2022-08-02 10:27:58 +00:00
Benety Goh
e381aebadf SERVER-68463 add requires_fcv_60 tag to replset/profile.js 2022-08-01 20:33:27 +00:00
Mark Benvenuto
0771b18bd0 SERVER-67917 Use DBDirectClient in FLE Crud Count path
(cherry picked from commit d74db703ac)
2022-08-01 19:10:09 +00:00
Mark Benvenuto
f262111e5a SERVER-67992 Use operation timer tracker in fle mongos crud processing
(cherry picked from commit 1bf56f5542)
2022-08-01 16:25:31 +00:00
Mark Benvenuto
735ea71cc6 SERVER-67462 Support renaming encrypted collections if client has correct privileges
(cherry picked from commit 2f2dc04da0)
2022-08-01 16:25:31 +00:00
Mark Benvenuto
c53c5bfdb8 SERVER-67430 Fix tags in fle2 tests and improve tag parser
(cherry picked from commit ddff02d34d)
2022-08-01 16:25:31 +00:00
Henrik Edin
cf30383ac0 SERVER-67305 Fix lock-free read timestamp order during repl stepup
Eliminate the race between setting read source to lastApplied and getting
the lastApplied timestamp for storage snapshot. When transitioning out of
primary catchup mode we may get a snapshot at lastApplied concurrent with
out-of-order writers.

Changed so the lastApplied timestamp is determined when calling
setTimestampReadSource to allow us to re-verify that we need to read
at lastApplied before opening the storage snapshot.

(cherry picked from commit 381f698f0e)
2022-07-29 19:37:28 +00:00
Timour Katchaounov
2846283187 SERVER-63049 Implemented counters for aggregate accumulator expressions
(cherry picked from commit a3f1584a71)
2022-07-29 14:23:49 +00:00
Enrico Golfieri
942ede89e7 SERVER-67535 move_chunk_large_chunk_map_workloads no longer reports timing breakdown of chunk migration due to server logging changes 2022-07-29 13:53:05 +00:00
Enrico Golfieri
b3404d9c12 SERVER-67259 Change sleep for assert.soon in ttl_deletes_not_targeting_orphaned_documents.js 2022-07-29 13:26:56 +00:00
Allison Easton
1f0ba85eda SERVER-67477 Ensure range deletion index is created on addShard (6.0 only) 2022-07-29 06:37:27 +00:00
Dan Larkin-York
2c6ad6de83 SERVER-68196 Fix broken assertion in BoundedSorter 2022-07-28 22:50:21 +00:00
Benety Goh
9647483fab SERVER-67006 log assertions between db.serverStatus() calls in replset/profile.js
(cherry picked from commit ca1befe525)
2022-07-28 18:18:14 +00:00
Alya Berciu
1021a18b98 SERVER-66072 Fix dependency analysis for $match on $expr with $rand 2022-07-28 15:44:46 +00:00
Abdul Qadeer
8c27699883 SERVER-67457 Wait for majority commit on completion 2022-07-28 14:13:19 +00:00
Rui Liu
8c67e03ceb SERVER-67377 Check whether $lookup pushdown feature availability on primary shard in mixed version cluster 2022-07-28 13:40:03 +00:00
Rui Liu
96a8cae810 SERVER-68016 Use little endian for deserializing data serialized by BufBuilder
(cherry picked from commit 5ecdd38356)
2022-07-28 13:38:42 +00:00
Pierlauro Sciarelli
c710f1a147 SERVER-68354 Set whenToClean to now when marking range deletion task as processing 2022-07-28 13:11:51 +00:00
Luke Chen
81a421c463 Import wiredtiger: 3ab8999188b852b1cebf3f9e9fe4e0956a8328b5 from branch mongodb-6.0
ref: e436e94012..3ab8999188
for: 6.0.1

WT-9432 Ensure Evergreen builds have debug information (#8006) (#8144)
2022-07-28 04:34:41 +00:00
Luke Chen
74e054b536 Import wiredtiger: e436e940122e02cf8c0e289d577636158ef11970 from branch mongodb-6.0
ref: c0c3fa3b36..e436e94012
for: 6.0.1

WT-9311 Ensure log messages clearly identify storage HW corruption (#8063) (#8143)
2022-07-28 04:34:41 +00:00
Luke Chen
fa4e71e759 Import wiredtiger: c0c3fa3b3678db9156be7dbf752413e44c30d998 from branch mongodb-6.0
ref: c5e905e5bf..c0c3fa3b36
for: 6.0.1

WT-9302 Deprecated object_target_size as a config in api_data.py (#8029) (#8101)
2022-07-28 04:34:41 +00:00
Kelsey Schubert
9e042c5e01 SERVER-68363 Mark 5.3 as EOL 2022-07-28 00:14:08 +00:00
Mikhail Shchatko
4e7e053566 SERVER-64112 Stop running applicable multiversion tests as soon as a release is EOL
(cherry picked from commit 17cbfe0780)
2022-07-27 16:43:55 +00:00
Gabriel Marks
24f1f48712 SERVER-67418 Retry apple SSLManagerCoordinator initialization on failure 2022-07-27 15:54:57 +00:00
Gabriel Marks
5f63fb90c8 SERVER-67532 Fail oplog server status section less 2022-07-27 15:53:40 +00:00
Matthew Russotto
baf9e3860e SERVER-66023 Use DelayableTimeoutCallback class to avoid resetting election and liveness timers.
(cherry picked from commit 94f976f475)
2022-07-27 15:48:58 +00:00
Matthew Russotto
38130f58fb SERVER-66023 Create a DelayableTimeoutCallback class to avoid constantly resetting timers.
(cherry picked from commit 466ddbc178)
(cherry picked from commit 87d6ec4077)
2022-07-27 15:48:58 +00:00
Richard Samuels
5a407c4804 SERVER-67122 Add warning when requesting a module that doesn't exist or when loading legacy ninja module
(cherry picked from commit 7da265df0f)
2022-07-27 15:21:28 +00:00
Daniel Gottlieb
238e3a345d SERVER-68330: Suppress mixed-mode testing assertions on config.transactions. 2022-07-27 15:10:03 +00:00
Richard Samuels
8b816e05b8 SERVER-66970 Add EOL'd releases info
(cherry picked from commit abd407e59f)
2022-07-27 15:06:44 +00:00
Kyle Suarez
bbf69a0cef SERVER-66308 restore 'sbe' command test for multiversion
(cherry picked from commit 1cb03bb7e9)
2022-07-27 14:37:39 +00:00
mathisbessamdb
cb3637653a SERVER-66246 refactoring tenant_migration_concurrent_writes_on_donor tests
(cherry picked from commit 2cd9b2a9ee)
2022-07-27 14:11:17 +00:00
Benety Goh
de3f207387 SERVER-67802 ensure mongos count can handle large values for skip
(cherry picked from commit f97eb26ed4)
2022-07-27 12:39:26 +00:00
Benety Goh
b895247379 SERVER-68158 fix incorrect replica set node reference in test for listIndexes
(cherry picked from commit 0825064445)
2022-07-27 11:52:19 +00:00
Benety Goh
489a83cb9f SERVER-67801 createIndexes on config.transactions should handle empty list of index specs
(cherry picked from commit a7cd9bf337)
2022-07-27 11:24:14 +00:00
Ruoxin Xu
183f6dd9d9 SERVER-68041 Robustify merge_write_concern.js and add diagnostic log
(cherry picked from commit 7684a3e44e)
2022-07-27 09:36:31 +00:00
Cheahuychou Mao
83b60779ae SERVER-67723 Make the SessionCatalogMongoD reaper not delete the on-disk state for any transaction session until its logical session has expired
(cherry picked from commit 338062b6a2)
2022-07-27 05:03:51 +00:00
Erin Liang
30b36e4dac SERVER-66348 Add a kills_random_sessions tag to exclude tests in concurrency simultaneous replication suites
(cherry picked from commit 63f99193df)
2022-07-27 05:03:51 +00:00
Daniel Gottlieb
14abee8f34 SERVER-66027: Speed up tenant migration tests.
(cherry picked from commit 15aa9218aa)
2022-07-27 01:26:47 +00:00
Daniel Gottlieb
a867b133ed SERVER-65454: Reset curop namespace after config.image_collection lookup.
(cherry picked from commit 4606b3cd56)
2022-07-27 01:26:47 +00:00
Antonio Fuschetto
943744bef3 SERVER-64340 Warn if balancer is disabled while draining shard 2022-07-26 23:21:21 +00:00
Faustoleyva54
0b70b452f5 SERVER-65006 Delay unsetting the index build Interceptor until we commit 2022-07-26 21:49:54 +00:00
Tausif Rahman
99a2f79f0e SERVER-67683 Change some of the modes in fast and opt builds
(cherry picked from commit ceb4b3dcc1)
2022-07-26 19:09:10 +00:00
Erwin Pe
e155cdf65c SERVER-62969 Fix ocsp_unable_to_staple_log.js wait to connect issue
(cherry picked from commit 1cc3e0d5e7)
2022-07-26 18:29:59 +00:00
Benety Goh
a738993758 SERVER-67802 ensure mongos count can handle large values for limit
(cherry picked from commit 49b1ad9884)
2022-07-26 18:28:35 +00:00
Tausif Rahman
a6e5b4986e SERVER-66938 Drastically simplify command to generate ninja files
(cherry picked from commit 0dd56eb035)
2022-07-26 17:47:16 +00:00
Pierlauro Sciarelli
cd1400b89f SERVER-67845 Acquire critical section in rename "check preconditions" phase only if target not sharded 2022-07-26 15:31:24 +00:00
Jeff Zambory
ef52815bba SERVER-67489 Dynamically split write_concern_majority_passthrough task on evergreen
(cherry picked from commit 40f897c037)
2022-07-26 15:30:11 +00:00
Jeff Zambory
a985639379 SERVER-67882 Give sharded_collections_jscore_passthrough additional time on mac variants
(cherry picked from commit 2e89d68b66)
2022-07-26 15:28:45 +00:00
Pierlauro Sciarelli
5f5940439f SERVER-68130 adjust autoSplitVector's estimatedAdditionalBytesPerItemInBSONArray 2022-07-26 14:44:45 +00:00
Robert Guo
b171b7cc3c SERVER-67188 Use -large instance for replica_sets_jscore_passthrough on Windows required variants 2022-07-26 14:07:55 +00:00
Pierlauro Sciarelli
07945a36c7 SERVER-66943 collStats must never retrieve orphans count on plain replset or for local internal collections 2022-07-26 08:24:57 +00:00
Sara Golemon
9fb8cf43c5 SERVER-66651 restore builtin role needs applyOps permissions
(cherry picked from commit 0ba2a32577)
2022-07-25 22:04:17 +00:00
Gregory Noma
a4241e43da SERVER-65262 Use timestamp_transaction_uint for commit_transaction
(cherry picked from commit 497bbb6faf)
2022-07-25 18:14:44 +00:00
Gregory Noma
bd9b75cbeb SERVER-67408 Preserve CollectionUUIDMismatch error even if database does not exist
(cherry picked from commit 9193a05db1)
2022-07-25 18:14:44 +00:00
Gregory Noma
2765c93e1a SERVER-67227 Avoid implicit collection creation for collectionUUID with insert/update commands
(cherry picked from commit 41994ed8c0)
2022-07-25 18:14:44 +00:00
Yu Jin Kang Park
1a252eefbe SERVER-67804 Exclude dbstats.js from multiversion suites 2022-07-25 15:04:16 +00:00
Allison Easton
f86a959e46 SERVER-64242 Make collStats aggregation stage retrieve orphans from BalancerStatisticsRegistry
(cherry picked from commit 2a7a609a78)
2022-07-25 14:36:56 +00:00
Nicholas Zolnierz
cc49687712 SERVER-66548 Add support for dependency tracking to $redact 2022-07-25 13:35:30 +00:00
Allison Easton
c9b1991520 SERVER-62857 Handle same-migration recovery on recipient upon multiple stepdowns
(cherry picked from commit 72d9520b6b)
2022-07-25 13:32:06 +00:00
Yu Jin Kang Park
0260e3c2d6 SERVER-67390: backup_restore.js should also allow exit code -SIGINT 2022-07-25 13:06:03 +00:00
Yu Jin Kang Park
698a9acc9b SERVER-64416: view creation returns same error as collection creation
(cherry picked from commit 6bd5618937)
2022-07-25 10:51:19 +00:00
Yu Jin Kang Park
9c897bf698 SERVER-67800 Exclude clustered_collection_create_index_clustered.js clustered_collection_creation.js from multiversion 2022-07-25 10:45:15 +00:00
csum112
83caa2a5ec SERVER-66808 Remove undocumented fields from the change stream error 2022-07-25 10:17:13 +00:00
Alya Berciu
b28c3902bd SERVER-66247 Refactor api version jstests to pass view name 2022-07-25 09:06:49 +00:00
Daniel Moody
8acfafff8e SERVER-66461 added macos signing at evergreen archive step
(cherry picked from commit 362dbbd4c3)
2022-07-22 19:28:35 +00:00
ruslan.abdulkhalikov
4bdceddd46 SERVER-65884 $lookup from ts optimize $sequentialCache
(cherry picked from commit dfec48667e)
2022-07-22 18:46:05 +00:00
Tommaso Tocci
f3c90b51c6 SERVER-68193 Sharding DDL coordinator can lock itself out in distlock retry loop
(cherry picked from commit 8293cd5641)
2022-07-22 11:08:42 +00:00
Pierlauro Sciarelli
33cc946709 SERVER-66958 Handle potential multiple "processing" range deletions on step-up 2022-07-22 11:07:22 +00:00
Tommaso Tocci
e6d0a3ee2b SERVER-57519 Make ARS use causally consistent ShardRegistry::getShard() function
(cherry picked from commit 527dfe85a1)
2022-07-22 10:40:22 +00:00
Tommaso Tocci
a1189eadd8 SERVER-66658 Shard registry might be accessed before initialization
(cherry picked from commit 4851768e1d)
2022-07-22 10:06:45 +00:00
Cheahuychou Mao
acd68273c6 SERVER-68209 Remove uassert that prevents config.image_collection entry from being invalidated
(cherry picked from commit e37f9d5eff)
2022-07-22 05:44:31 +00:00
Robert Guo
3714b8c53c SERVER-68201 add the commit queue variant to the release branch's evergreen config 2022-07-21 15:18:42 +00:00
James Wahlin
3c2e77f709 SERVER-66310 Make ExpressionSetUnion::isCommutative() collation aware
(cherry picked from commit 2c53b7b684)
2022-07-21 13:36:54 +00:00
Mikhail Shchatko
92bbf4379b SERVER-67690 Use mongo-task-generator that randomizes test order
(cherry picked from commit 794053e5d6)
2022-07-21 11:37:15 +00:00
Mikhail Shchatko
7472524a03 SERVER-66034 Generate multiversion_exclude_tags.yml for retryable_writes_downgrade tasks
(cherry picked from commit 589aa13e04)
2022-07-21 11:08:01 +00:00
Mihai Andrei
43e5ced6ad SERVER-67911 Set predetermined values for _id in accumulator_fix_last_[continuous|lts].js 2022-07-20 17:17:39 +00:00
Dianna Hohensee
4e85654b61 SERVER-66529 OplogManager must not release mutex, so as to avoid wrongly fowarding the oplogReadTimestamp after a cappedTruncateAfter operation sets it back.
(cherry picked from commit d9e643fe4d)
2022-07-20 16:21:30 +00:00
Denis Grebennicov
edd4245ab1 SERVER-67395 Increase the timeout of sharding_update_v1_oplog_jscore_passthrough task to 2.5 hours on macos-arm64 2022-07-20 11:57:44 +00:00
Kyle Suarez
7765a294e9 SERVER-68062 permit DocumentSourceGeoNearCursor to have secondary collections
(cherry picked from commit 3bf33a7f67)
2022-07-15 19:30:22 +00:00
Aaron Morand
e61bf27c2f SERVER-64845 Bump for 6.0.0 GA 2022-07-05 10:42:37 -04:00
Moustafa Maher Khalil
6e2dcc5a39 SERVER-65233 dropIndex command in collection_uuid FSM test can succeed with indexNotFound error 2022-06-29 21:31:44 +00:00
Moustafa Maher Khalil
dd216e3ed3 SERVER-67494 Increase the number of max ports per fixture for c2c suites 2022-06-29 21:30:32 +00:00
Moustafa Maher Khalil
82bdc07662 SERVER-65234 collection_uuid_index_commands test should account for HostUnreachable error from different shards 2022-06-29 21:29:16 +00:00
Luke Chen
fe65f07e07 Import wiredtiger: c5e905e5bf1c4767bdbeeaf0636e89581c68221d from branch mongodb-6.0
ref: 31b70b7fe6..c5e905e5bf
for: 6.0.0-rc13

WT-9500       Fix RTS to use cell time window instead of key/value timestamps of HS update
2022-06-29 16:50:18 +10:00
Erwin Pe
9f965ec24d SERVER-67470 Fix incorrect fieldName values in ECOC entries following a modifier-type update
(cherry picked from commit 20986cb5fc8e3fcd721034a00dd476ab1bd34772)
2022-06-24 21:02:58 +00:00
Erwin Pe
f538b994c4 SERVER-67445 Remove setting of setSingleBatch to 'true' in FLEQueryInterfaceImpl::findDocuments
(cherry picked from commit 7f728aafb7)
2022-06-24 16:05:53 +00:00
Joel Redman
6b4de97ce4 SERVER-66933 Exclude API tests from sharded_retryable_writes_downgrade
(cherry picked from commit 5f5f73415d)
2022-06-23 15:18:35 -04:00
Mindaugas Malinauskas
47da65ec2b SERVER-66462 Fixed change stream pre-image write performance issue
(cherry picked from commit 043545f825)
2022-06-23 17:00:05 +01:00
Israel Hsu
71b1def626 SERVER-67441 Disable multi_statement_transaction_atomicity_isolation_server_status_mongos.js 2022-06-23 15:07:45 +00:00
Antonio Fuschetto
9d441f81c8 SERVER-67352 Skip identifying writes on orphaned documents in replica set deployments 2022-06-23 14:00:43 +00:00
Luke Chen
3b7c4577f2 Import wiredtiger: 31b70b7fe65536b44c77f07ed3815048673867f3 from branch mongodb-6.0
ref: 8fb2c7b2a6..31b70b7fe6
for: 6.0.0-rc11

WT-9477       Don't allow checkpoint triggering internal page split which leads to corrupted internal page in the checkpoint
2022-06-23 16:05:01 +10:00
Eric Cox
dce8e9938f Revert "Revert "Merge branch 'v6.0' of github.com:10gen/mongo into v6.0""
This reverts commit 44385b89a6.
2022-06-22 16:58:08 +00:00
Eric Cox
44385b89a6 Revert "Merge branch 'v6.0' of github.com:10gen/mongo into v6.0"
This reverts commit e24af2270e, reversing
changes made to ecf315a92e.
2022-06-22 14:21:07 +00:00
Eric Cox
e24af2270e Merge branch 'v6.0' of github.com:10gen/mongo into v6.0 2022-06-22 02:26:08 +00:00
Eric Cox
ecf315a92e SERVER-67338 Fix ownership of HashAggStage key in SBE
(cherry picked from commit 82e8ac207e)
2022-06-22 02:25:14 +00:00
Davis Haupt
816918e7eb SERVER-65864 Parse $densify step as a NumberLong when using a date unit
(cherry picked from commit 8be8472460)
2022-06-21 20:52:32 +00:00
Matt Boros
c6430dd53b SERVER-67376: 32 bit integer overflow in Value{} creation
(cherry picked from commit 153d7c719b)
2022-06-21 18:26:59 +00:00
Benety Goh
7aaea4fc06 SERVER-66520 add index build UUID to BackgroundOperationInProgress message
(cherry picked from commit d6a12bacdc)
2022-06-21 17:23:35 +00:00
Benety Goh
699be8f8b3 SERVER-67036 remove floor for collMod cappedSize option to be consistent with create command
(cherry picked from commit d507d5e004)
2022-06-20 23:17:47 +00:00
Shreyas Kalyan
e9f8857523 SERVER-66662 Block insertion into __safeContent__
(cherry picked from commit 00300876a899a40fd6121b8f3abacdd3194daf54)
2022-06-20 14:53:39 +00:00
Sergi Mateo Bellido
f9c9120058 SERVER-66541 Rely on a refresh to define the metadata barrier 2022-06-20 07:59:31 +00:00
Sergi Mateo Bellido
dd97dc5f81 Revert "SERVER-66541 Clear the filtering metadata on setFCV"
This reverts commit 7bc0a21e57.
2022-06-20 07:59:31 +00:00
Mark Benvenuto
fa24cc6010 SERVER-66663 Raise default contention factor for equality indexes to 4
(cherry picked from commit 4817d3fda9)
2022-06-18 00:51:50 +00:00
Mark Benvenuto
ad83c9f408 SERVER-67316 LDAP CNAME resolution truncates CNAME incorrectly
(cherry picked from commit c82753a676)
2022-06-17 18:43:34 +00:00
Mark Benvenuto
a831109e06 SERVER-66724 Create FLE 2 Equality Match Expression
(cherry picked from commit 33d893ff83)
2022-06-17 18:43:34 +00:00
nandinibhartiyaMDB
53db7af5a8 SERVER-61812: Ensure cache is not refreshed during $listLocalSessions 2022-06-17 17:53:46 +00:00
Shreyas Kalyan
8ca8c1cb0d SERVER-66944 Disable ESE on MacOS
(cherry picked from commit 4bb98c9d59)
2022-06-17 17:17:59 +00:00
Steve Tarzia
b7eb1cd26e SERVER-66418 fix bug in projection created during dependency analysis 2022-06-17 16:31:40 +00:00
Jack Mulrow
c48357dadc SERVER-67273 Add feature flag to always create config.transactions index on step up
(cherry picked from commit 389d799f96)
2022-06-16 21:11:37 +00:00
Eric Cox
342552401a SERVER-66989 Make HashAgg record store key owned
(cherry picked from commit e399422548)
2022-06-16 19:41:29 +00:00
Eric Cox
acaf760974 SERVER-66989 Make HashAgg record store key owned
(cherry picked from commit e399422548)
2022-06-16 18:57:48 +00:00
Allison Easton
1bf1161e5d SERVER-59658 Change durationMillis to duration 2022-06-16 13:56:06 +00:00
Allison Easton
e1c5a1d2b8 SERVER-59658 Improve logging to reflect that sharding metadata refresh waiting on replication 2022-06-16 13:56:06 +00:00
James Wahlin
363112bd64 SERVER-67315 Fix possible int32 overflow on call to DocumentSourceSort::createBoundedSort()
(cherry picked from commit c5b3c193d8)
2022-06-16 12:40:42 +00:00
Jason Zhang
952ed79880 SERVER-66984 config.transactions collection may end up not having the "parentLsid" partial index if the primary steps down or shuts down while setting up the collection
(cherry picked from commit f9a3cf2107)
2022-06-15 18:43:46 +00:00
Matthew Russotto
fa286387d7 SERVER-65723 Add parameter oplogBatchDelayMillis to improve batching on caught-up secondaries
(cherry picked from commit 97dc4971f5)
2022-06-15 15:31:31 +00:00
Matthew Russotto
fdef6fd509 SERVER-65273 Enhance waiting API of oplog buffer.
Add millisecond granularity, deadlines, and Interruptibles

(cherry picked from commit 6d128d3ac2)
2022-06-15 15:31:31 +00:00
Mark Benvenuto
2b01d3385d SERVER-67181 Return the OpTime of Commit Transaction for FLE2 CRUD on mongos
(cherry picked from commit 95aad3a90f)
2022-06-15 14:52:10 +00:00
Mihai Andrei
9bb35bb7e3 SERVER-67179 Make 'checkBothEnginesAreRunOnCluster' aware of 'featureFlagSbeFull' (cherry picked from commit e1546a4cf5) 2022-06-15 14:28:25 +00:00
Benety Goh
82ddea1581 Revert "SERVER-67036 remove floor for collMod cappedSize option to be consistent with create command"
This reverts commit 51e661694d.
2022-06-15 11:05:46 +00:00
Benety Goh
51e661694d SERVER-67036 remove floor for collMod cappedSize option to be consistent with create command
(cherry picked from commit d507d5e004)
2022-06-14 22:10:58 +00:00
Sergi Mateo Bellido
7bc0a21e57 SERVER-66541 Clear the filtering metadata on setFCV
Relying on config.cache.collections to signal secondary nodes
2022-06-14 17:35:40 +00:00
Dan Larkin-York
f275c61e5d SERVER-66727 Use full-precision timestamp for time-series bucketing decision 2022-06-14 16:18:51 +00:00
David Percy
b56ef4dbd8 SERVER-67072 Fix pushdown of time-series metadata predicates in $or
(cherry picked from commit b8f0fb561f)
2022-06-14 14:37:35 +00:00
Matt Boros
0c75db7b11 SERVER-64994 Extend the planner to allow soft hints about index traversal direction
(cherry picked from commit 00d2a56763)
2022-06-13 23:50:25 +00:00
Jack Mulrow
8971b20d7b SERVER-67016 Cancel transaction API transactions if their caller is interrupted
(cherry picked from commit 037f714353)
2022-06-13 22:25:06 +00:00
Jason Zhang
895e8c6f61 SERVER-66481 Disable cross-shard internal transactions run from a shard
(cherry picked from commit 9e56fb40d8)
2022-06-13 21:52:14 +00:00
kauboy26
4aac2f5da3 SERVER-67080 PerClusterDataConsistencyHook checks data consistency on the same cluster twice 2022-06-13 21:28:46 +00:00
Sara Golemon
b5adaa6136 SERVER-66329 Authenticate connections during rollover tests
(cherry picked from commit 9b3509a221)
2022-06-13 20:38:41 +00:00
Paolo Polato
39afcf31d3 SERVER-67106 allow the execution of _flushRoutingTableCacheUpdates over collection views
(cherry picked from commit 8e0bbe75ef)
2022-06-13 08:29:14 +00:00
David Bradford
aa93243e5f SERVER-67175: Don't run multiversion fuzzer on debian 11 2022-06-10 18:46:23 +00:00
Allison Easton
119a34c2e0 SERVER-63243 Range deleter must not clean up orphan ranges in a round-robin fashion
(cherry picked from commit f44581d5bf
2022-06-10 13:59:34 +00:00
Kaloian Manassiev
1937d9457f SERVER-66866 Make the range deleter not sleep under collection lock
(cherry picked from commit cec61a460e)
2022-06-10 12:32:43 +00:00
Allison Easton
774260fa0e SERVER-66074 Remove usage of toArray in collection_defragmentation.js
(cherry picked from commit 2a61fb4831)
2022-06-10 07:40:07 +00:00
Allison Easton
4c5b24082e SERVER-66653 Remove usage of this.tid from assertDocWasUpdated
(cherry picked from commit 0048e74c67)
2022-06-10 07:33:24 +00:00
Allison Easton
35c9952a6c SERVER-66868 Fail point must be enabled on new primary before step up in range_deletion_ordering_with_stepdown.js
(cherry picked from commit 3165867be3)
2022-06-10 07:09:38 +00:00
Amirsaman Memaripour
45b8a6f9a3 SERVER-66799 Fix getParameterWithDetails.js failure on ephemeralForTest
(cherry picked from commit e74b25e957)
2022-06-09 23:30:48 +00:00
Jack Mulrow
d12805a9e4 SERVER-66725 SERVER-66659 Incoming retryable txns abort old txns and abort conflicting txns once
(cherry picked from commit bc385b8dcb)
2022-06-09 23:05:46 +00:00
Jack Mulrow
0f2eaf1d73 SERVER-67076 Add missing early return in DocumentSourceFindAndModifyImageLookup
(cherry picked from commit 89e19118f9)
2022-06-09 18:45:04 +00:00
nandinibhartiyaMDB
52f58747e8 SERVER-66046: Abort resharding on recipient errors
(cherry picked from commit f016b10539)
2022-06-09 15:02:22 +00:00
Ian Boros
9847e9146a SERVER-66814 Use classic MatchExpression for applying filters in SBE
Co-authored-by: Eric Cox <eric.cox@mongodb.com>
(cherry picked from commit b16ad103a503897898fb91c5f9d198407e3e2abf)
2022-06-09 13:48:09 +00:00
Ruoxin Xu
2992fa920f SERVER-66999 Check sharding initialized if running an explain with clusterFind command
(cherry picked from commit 8ab9a78b45)
2022-06-09 11:47:38 +00:00
Cheahuychou Mao
afab6f83ed SERVER-67026 Add new line to fixture_helpers.js
(cherry picked from commit a3c2a6a8c9)
2022-06-09 03:20:45 +00:00
Cheahuychou Mao
8e7fb8c5c4 SERVER-67026 InternalTransactionChunkMigrationTest and RetryableInternalTransactionTest fixtures should retry internal transactions on LockTimeout errors
(cherry picked from commit 26a4d4f3da)
2022-06-09 03:20:45 +00:00
Robert Guo
90a5f12cb1 SERVER-61972 un-delete version check for mongod options 2022-06-09 02:37:38 +00:00
Robert Guo
10776658a7 SERVER-61972 ensure useRandomBinVersionsWithinReplicaSet's respected 2022-06-08 22:52:08 +00:00
Charlie Swanson
904122d4b1 SERVER-66812 Fix bug with $group projection analysis
(cherry picked from commit 8a3af130c7)
2022-06-08 13:44:59 +00:00
Silvia Surroca
5c874317f9 SERVER-66336 ConfigsvrCoordinators initial checkpoint may incur in DuplicateKey error 2022-06-08 08:07:02 +00:00
Paolo Polato
daf78f2f25 SERVER-65371 Interrupt shardSvrMoveRange when the node steps down 2022-06-08 06:41:28 +00:00
Jack Mulrow
266864d409 SERVER-66973 Eagerly reap config.transactions entries for retryable sessions
(cherry picked from commit 77e9ff7fd5)
2022-06-07 22:27:58 +00:00
Jack Mulrow
90cccd16ef SERVER-66993 Stop tracking highest child session txnNumber
(cherry picked from commit f0a4461798)
2022-06-07 17:55:33 +00:00
Cheahuychou Mao
5edd6ea167 SERVER-67029 Make aggregate command in internal_transactions* workloads robust against failover/shutdown or collection rename
(cherry picked from commit b6b89a3019)
2022-06-07 17:31:57 +00:00
Pierlauro Sciarelli
9927679687 SERVER-66950 Fix orphans feature flag check in upgrade_downgrade_sharded_cluster.js (v6.0) 2022-06-07 14:15:24 +00:00
Romans Kasperovics
049359d123 SERVER-66644 Fix and re-enable profile_operation_metrics.js for debug builds
(cherry picked from commit 76a6a05d16)
2022-06-07 12:45:26 +00:00
Pierlauro Sciarelli
b0c54a72ba SERVER-67001 Make balancer wait interruptably for migration-related commands sent to shards 2022-06-07 09:32:59 +00:00
Jason Zhang
de8a1fc995 SERVER-66758 Remove usage of CancelableOperationContext when cleaning up internal sessions in setFCV 2022-06-06 18:35:38 +00:00
Jason Zhang
a867b3538d SERVER-66948 Catch NoSuchTransaction as an acceptable error in internal transactions coordinator cleanup test
(cherry picked from commit 10c8db0e32)
2022-06-06 17:57:35 +00:00
Vlad Rachev
29cd1eb4bd SERVER-66955 Remove JSON.send usage in sys-perf and performance
(cherry picked from commit 4218553802)
2022-06-06 17:10:20 +00:00
Mihai Andrei
56e1217005 SERVER-65960 Fall back to classic engine when NLJ is chosen
(cherry picked from commit ccdab6f1ab)
2022-06-06 14:45:46 +00:00
Jack Mulrow
16830c53d1 SERVER-66992 Optimize how often SessionCatalog mutex is held
(cherry picked from commit d457fc3a97)
2022-06-03 20:58:41 +00:00
Mark Benvenuto
ab988bae09 SERVER-66901 Make contention factor accept all valid positive integer types
(cherry picked from commit d4303b413a)
2022-06-03 20:10:37 +00:00
Andrew Shuvalov
c3b8c78465 SERVER-66843 Use defensive programming in DeadlineFuture destructor 2022-06-03 16:34:57 +00:00
Robert Guo
a4ae9e7d4b SERVER-66988 add variant to stress initialSyncId 2022-06-03 15:46:15 +00:00
Zituo Jin
3f587ed65e SERVER-66615 Increase timeout for replica_sets_large_txns_format on Enterprise RHEL 8.0 Required 2022-06-03 14:50:49 +00:00
Mickey. J Winters
fea5674353 SERVER-66062 make sure jstests/change_streams/ddl_create_index_txn.js doesn't accidentally use a cross shard transaction 2022-06-03 14:07:25 +00:00
Vesselina Ratcheva
67fd048070 SERVER-66444 Make storage watchdog compatible with FCBIS
(cherry picked from commit 322be402dd)
2022-06-03 04:10:04 +00:00
Jack Mulrow
a36f71f147 SERVER-66844 Transaction API shouldn't use CancelableOperationContext
(cherry picked from commit 074e2ac50c)
2022-06-03 02:57:31 +00:00
Jack Mulrow
1163832105 SERVER-66852 Eagerly erase retryable child sessions from SessionCatalog
(cherry picked from commit 8e96ecbf56)
2022-06-03 01:38:58 +00:00
sergey.galtsev
5efce3b40f SERVER-66766 stopFLECrud must wait for threads to exit 2022-06-02 22:41:41 +00:00
David Bradford
bfc3fee32a SERVER-66962: multiversion configuration updates
(cherry picked from commit 0a861695ec)
2022-06-02 21:41:51 +00:00
Cheahuychou Mao
5e72b325cd SERVER-66777 Ensure that internal transactions do not get interrupted by logical session reaper
(cherry picked from commit 01938cf723)
2022-06-02 20:57:20 +00:00
Romans Kasperovics
308882d125 SERVER-66830 Remove multiversion-incompatible assertion in view_aggregation.js 2022-06-02 20:56:07 +00:00
Randolph Tan
cebec3621d SERVER-63971 Make coordinate commit wait for transaction to actually complete by default
(cherry picked from commit 52defdf7c5)
2022-06-02 20:32:32 +00:00
Jack Mulrow
5fc426665b SERVER-66960 Cache highest child txnNumber on checked out sessions
(cherry picked from commit b2f773225a)
2022-06-02 19:21:50 +00:00
Gregory Noma
db3dfc6264 SERVER-66910 Ensure collectionUUID is respected for collMod unique index conversion
(cherry picked from commit 7768b6946b)
2022-06-02 18:51:43 +00:00
Tommaso Tocci
882698aa8b SERVER-66929 Persist CompactStructuredEncryptionDataCoordinator document before entering first phase
(cherry picked from commit d4b666e913)
2022-06-02 16:15:11 +00:00
Sergey Galtsev
c0d67ac4fc SERVER-66622 fail to createCollection when running in 5.x compatibility mode 2022-06-02 15:37:52 +00:00
David Storch
20c2bd8b67 SERVER-66833 Improve error and log messages on attempt to use unsupported legacy op code
(cherry picked from commit 6147e2b653)
2022-06-02 14:14:26 +00:00
Sergi Mateo Bellido
425b14f85f SERVER-66542 Unifying paths on the CatalogCache lookup function
Before this change there was an early-exit path that wasn't updating the
stats neither logging a line.

(cherry picked from commit 46a8e36aad)
2022-06-02 12:24:51 +00:00
Timour Katchaounov
b499c915d1 SERVER-66379 $or to $in conversion flawed
(cherry picked from commit 951197b383)
2022-06-02 11:27:12 +00:00
Enrico Golfieri
42f0d7d83d SERVER-62432 Ensure safe access to ShardingDDLCoordinator instance state documents
(cherry picked from commit c4522f8d57)
2022-06-02 11:03:14 +00:00
Jordi Serra Torrens
60f659abea SERVER-66825 Fix deadlock on MigrationDestinationManager::onStepDown
(cherry picked from commit 589d65d55b)
2022-06-02 10:38:51 +00:00
Pierlauro Sciarelli
739777aa24 SERVER-66805 Change public-facing moveRange::forceJumbo to bool type 2022-06-02 08:35:18 +00:00
Cheahuychou Mao
05683c2d9d SERVER-66850 Make the LogicalSessionCache reaper only scan parent sessions when searching for expired logical sessions
(cherry picked from commit d461c7c2fb)
2022-06-01 23:26:39 +00:00
Jack Mulrow
d94581d33c SERVER-66851 Internal session pool should use parent sessions as keys for child session map
(cherry picked from commit 37e28d05ca)
2022-06-01 22:48:03 +00:00
David Bradford
1747882582 SERVER-66557: Refactor and update multiversion setup and config
(cherry picked from commit 0abdf7bc75)
2022-06-01 20:07:41 +00:00
nandinibhartiyaMDB
2657601c25 SERVER-62272 : Migration OK for chunks existing before schema validator
(cherry picked from commit bc1ac6fb2e)
2022-06-01 19:10:02 +00:00
Denis Grebennicov
6cb2394959 SERVER-66540 Don't run awaitData cursor notification on insert part in await_getmore_cmd.js in majority readConcern 2022-06-01 10:34:36 +00:00
samontea
b4b8fa06d7 SERVER-66558 $sort does not rewrite to bounded sort when multiple index options are available 2022-05-31 21:11:59 +00:00
Pierlauro Sciarelli
44bc738a28 SERVER-66720 Interrupt migration-related commands on CSRS upon stepdown 2022-05-31 19:46:52 +00:00
Tommaso Tocci
459b223f35 SERVER-66860 FSM tests should not reuse same database names
(cherry picked from commit d88a892d5b)
2022-05-31 19:08:26 +00:00
Yuhong Zhang
b1b34b9541 SERVER-66556 Block shutdown when releasing cursors to avoid race conditions
(cherry picked from commit 66e938045f)
2022-05-31 18:12:21 +00:00
Matt Kneiser
66ab552d94 SERVER-66769 Add Windows support to spawnhost setup script
(cherry picked from commit ad379f1338)
2022-05-31 17:07:11 +00:00
Shin Yee Tan
8a33efbe38 SERVER-65399 Restart index build if recover in standalone and 'commitIndexBuild' oplog entry replayed 2022-05-31 17:05:55 +00:00
Vojislav Stojkovic
a8fd3bd540 SERVER-65131 Disable opportunistic read targeting
(cherry picked from commit e6547d5561)
2022-05-31 17:04:38 +00:00
Louis Williams
46876f4012 SERVER-66718 Allow StorageInterfaceImpl to perform more clustered collection scans
(cherry picked from commit 600e8b6e84)
2022-05-31 16:41:53 +00:00
Robert Guo
86cb7ea364 SERVER-65672 upgrade python packages to support 3.10 2022-05-31 15:03:45 +00:00
Lingzhi Deng
2fe7afd99f SERVER-66585 Update test tags for repl_startup_error_no_hang_on_shutdown.js 2022-05-31 14:33:12 +00:00
nandinibhartiyaMDB
5b5c358f61 SERVER-65027: Ensure resharding commands are parsed strictly
(cherry picked from commit 9f2b96479c)
2022-05-31 12:40:23 +00:00
Jordi Olivares Provencio
6247d20bcd SERVER-65426 Verify if there's an existing view when creating a collection
(cherry picked from commit c9d4924f3b)
2022-05-31 09:14:05 +00:00
Jordi Olivares Provencio
97ce6056df SERVER-66489 Fix race condition in ticketholder test
(cherry picked from commit c9c71fa2a7)
2022-05-31 08:50:28 +00:00
Pierlauro Sciarelli
6b4d0239a8 SERVER-66857 Retry moveChunk and moveRange indefinitely when router hits retriable errors 2022-05-30 12:30:32 +00:00
Paolo Polato
762492c1f9 SERVER-66714 Use ScopedTaskExecutor to manage requests cancellation at BalancerCommandsScheduler stop()
(cherry picked from commit 11a255c08f)
2022-05-29 20:43:20 +00:00
Paolo Polato
3faed4f1f6 SERVER-66716 remove early return check from _configSvrMoveRange 2022-05-29 20:43:20 +00:00
Paolo Polato
9ae0a24f4d SERVER-66480 introduce joinMigration shard cmd to set a barrier on the Balancer initialisation
(cherry picked from commit 531dfe764b)
2022-05-29 20:43:20 +00:00
Paolo Polato
491f15aaca SERVER-65969 Fix data race in ScopedDonateChunk
(cherry picked from commit bfee7c7eae)
(cherry picked from commit cb69b7f2bcfe4d7eb50da54d6e308b61ff29e6f6)
2022-05-29 20:43:20 +00:00
sergey.galtsev
b53aaa7d7e SERVER-66771 rename mongo_crypt_v1_dev
(cherry picked from commit 494673d29c949ee04fa2d5ef183390dca53e9069)
2022-05-29 15:43:26 +00:00
Jack Mulrow
b054e4fb3c SERVER-66388 Disallow using transaction API in operations with shard versions
(cherry picked from commit 51bff7a1d0)
2022-05-28 02:17:24 +00:00
Jack Mulrow
2332496003 SERVER-66849 Error labels should account for cluster abort and commit commands
(cherry picked from commit 6670518c90)
2022-05-28 01:54:02 +00:00
Jack Mulrow
cd8d0b4122 SERVER-66848 Internal transactions test command API use should use owned BSON
(cherry picked from commit 097483e9f0)
2022-05-27 23:05:02 +00:00
sergey.galtsev
87819b6575 SERVER-66711 rename mongo_crypt to mongo_crypt_shared 2022-05-27 22:19:05 +00:00
Mihai Andrei
06fa33ed4e SERVER-66583 Re-enable SBE as the default execution engine and fall back to classic if no SBE compatible $group or $lookup exists
(cherry picked from commit aa40f5e)
2022-05-27 21:44:19 +00:00
Jack Mulrow
3da01eeee8 SERVER-66828 Fix coverity defect
(cherry picked from commit 1bb4f64ef8)
2022-05-27 17:37:19 +00:00
Gregory Noma
e43fd84f5a SERVER-65218 Run ShardSplitDonorServiceTest with wiredTiger
(cherry picked from commit 4b99e8d94d)
2022-05-27 14:17:48 +00:00
Mindaugas Malinauskas
0cbf0426f7 SERVER-66826 Fix requires_fcv tag on lookup_pit_pre_and_post_image.js and lookup_pre_image.js 2022-05-27 11:53:46 +00:00
Luke Chen
d78084b291 Import wiredtiger: 8fb2c7b2a69abe5de86c870b64ba2ee85eaf1ccb from branch mongodb-6.0
ref: f4d48773a3..8fb2c7b2a6
for: 6.0.0-rc8

WT-9328       Don't remove the update from the transaction if it has been inserted to the update chain
2022-05-27 04:12:26 +00:00
Luke Chen
77d1f6b8d9 Import wiredtiger: f4d48773a3f1f2f7318e48f3c6afe295cb56c409 from branch mongodb-6.0
ref: 746497a6ff..f4d48773a3
for: 6.0.0-rc8

WT-9007       Don't output verbose messages when rolling back transactions
2022-05-27 04:12:26 +00:00
Luke Chen
2541522468 Import wiredtiger: 746497a6ffd88921928244047fbeb70275884163 from branch mongodb-6.0
ref: c2a7ed8278..746497a6ff
for: 6.0.0-rc8

WT-9115       Accept EINVAL error code from commit in the cpp suite
2022-05-27 04:12:26 +00:00
sergey.galtsev
db54aff64f SERVER-66771 Rename CSFLE build artifacts 2022-05-27 02:01:55 +00:00
sergey.galtsev
12075d9eef SERVER-66533 update FLE array tag size estimation 2022-05-27 00:15:25 +00:00
Davis Haupt
9c4ec2ed95 SERVER-66784 numberDecimalsAlmostEqual shell helper now works for negative numbers 2022-05-26 21:04:23 +00:00
Mihai Andrei
dc6062a86a SERVER-66768 Mark find_flip_sbe_enabled with requires_fcv_51 2022-05-26 18:47:30 +00:00
Gregory Noma
012db1b7bd SERVER-66719 Take FCV lock in MODE_IS for shared global lock modes
(cherry picked from commit 1c3268ae7f)
2022-05-26 13:26:05 +00:00
Mark Benvenuto
f45d3eb39a SERVER-66734 Extend FLE2FindEqualityPayload to take ServerDataEncryptionLevel1Token
(cherry picked from commit b198148add)
2022-05-26 12:48:42 +00:00
Rui Liu
82f32f737d SERVER-66538 Exclude timeseries_coll_mod.js from multiversion pre-6.0 tests
(cherry picked from commit 973321a0e7)
2022-05-26 11:55:26 +00:00
Mark Benvenuto
e37d60a30c SERVER-66528 Return the OpTime of Commit Transaction for FLE2 CRUD
(cherry picked from commit d3a424e7ea)
2022-05-26 04:55:02 +00:00
Alexander Neben
e7d454052c SERVER-66384 Ninja shared build log and common output directory
(cherry picked from commit 55ef8e5a8f)
2022-05-25 19:41:55 +00:00
Cheahuychou Mao
1d04c89fab SERVER-65639 Update comment in internal_transactions_kill_sessions.js
(cherry picked from commit 58821353f8)
2022-05-25 17:33:00 +00:00
Robert Guo
7aae6f2752 SERVER-66644 temporarily disable profile_operation_metrics.js
(cherry picked from commit 44eda56d1d)
2022-05-25 14:38:48 +00:00
Robert Guo
fb9f538d1b SERVER-66062 temporarily disable ddl_create_index_txn.js
(cherry picked from commit 1760e2e58af8203efcd5224ae3483ad24accdc10)
2022-05-25 13:56:00 +00:00
Cheahuychou Mao
8da319e0f6 SERVER-65639 Add concurrency workload that kills sessions with active internal transactions started using test command
(cherry picked from commit 73a42e73bf)
2022-05-25 01:05:53 +00:00
Jack Mulrow
222a559ce8 SERVER-66565 Create config.transactions partial index in setFCV 2022-05-24 21:12:59 +00:00
Gregory Wlodarek
27921f09fb SERVER-66327 Omit forceValidationWithFeatureCompatibilityVersion in the jstestfuzz yaml configs 2022-05-24 16:39:19 +00:00
Ruoxin Xu
2d4f4b0403 SERVER-66573 Add FCV tag in lookup_unionWith_subpipeline_local_read.js
(cherry picked from commit 93ec9da133)
2022-05-24 14:41:06 +00:00
Antonio Fuschetto
c8d9624ca6 SERVER-66660 Exclude unsupported test cases in 5.3 version from change_stream_no_orphans.js 2022-05-24 14:37:39 +00:00
Max Hirschhorn
71f9c40007 SERVER-66618 Wait in test for resharding coordinator to persist abort.
Fixes an issue in the resharding_coordinator_recovers_abort_decision.js
test where the reshardingPauseCoordinatorBeforeBlockingWrites failpoint
is being released too early and allowing the resharding coordinator to
decide to commit the resharding operation instead.

(cherry picked from commit 18ec837622)
2022-05-23 18:19:51 +00:00
Cheahuychou Mao
fb115177b0 SERVER-66647 internal_transactions_unsharded.js should set storeFindAndModifyImagesInSideCollection on all mongods
(cherry picked from commit 7a8e211d20)
2022-05-23 16:35:29 +00:00
Cheahuychou Mao
76d6c3a764 SERVER-66344 Only check the response if the last try was not a retry that failed
(cherry picked from commit 62ef2bf50c)
2022-05-23 16:35:29 +00:00
Cheahuychou Mao
44f1b289e4 SERVER-66344 Make internal transactions workloads more extensible
(cherry picked from commit 995d733cf7)
2022-05-23 16:35:29 +00:00
Cheahuychou Mao
d40fcdc9d8 SERVER-66616 Fix clang_tidy error on enterprise-rhel80-dynamic-clang-tidy-v4 caused by getHighestTxnNumberWithChildSessions()
(cherry picked from commit 7ed954527e)
2022-05-23 16:35:29 +00:00
Romans Kasperovics
aaa27a3f0f SERVER-66215 Create Sorter::File instances only when actually needed
(cherry picked from commit dd2874d1fc)
2022-05-23 16:06:46 +00:00
Gabriel Marks
a8f474bb04 SERVER-66111 Set default timeouts in HttpClient 2022-05-20 20:02:30 +00:00
Gabriel Marks
9853be92a5 SERVER-66087 Move curlLibraryManager.initialize() to global initializer 2022-05-20 17:14:24 +00:00
Randolph Tan
a04d70ba73 SERVER-65925 Reshard commit and abort should check for transient errors when joining
(cherry picked from commit c18e300ab0)
2022-05-20 14:23:22 +00:00
Jack Mulrow
e47a080b17 SERVER-66560 Check feature flag before fetching child transaction history
(cherry picked from commit 2fdcda013f)
2022-05-19 21:58:50 +00:00
Mihai Andrei
66be073ec0 SERVER-66551 Rename internalQueryEnableSlotBasedExecutionEngine back to internalQueryForceClassicEngine
(cherry picked from commit 89945d5b95)
2022-05-19 20:40:23 +00:00
Sara Golemon
783b48a1d1 SERVER-65777 Fix ns emitted for UMC commands
(cherry picked from commit 925e00657a)
2022-05-19 18:54:45 +00:00
David Bradford
cdb7058ee9 SERVER-66517: Migrate cwrwc_wc_majority_passthrough to be a generated task
(cherry picked from commit 5276525779)
2022-05-19 17:04:02 +00:00
James Wahlin
90ee530000 SERVER-66559 Expand the internalQueryMaxAddToSetBytes param from 32 to 64 bits
(cherry picked from commit 57f6fcb999)
2022-05-19 16:40:09 +00:00
Cheahuychou Mao
9059aa49eb SERVER-66566 Optimize scanning SessionCatalog when refreshing retryable writes from storage
(cherry picked from commit c088640979)
2022-05-19 15:17:41 +00:00
Tommaso Tocci
398f1e22ce
SERVER-66553 configure_collection_balancing_setFCV.js should not run in multiversion suite 2022-05-19 14:53:43 +02:00
sergey.galtsev
8d64bcb59b SERVER-66488 Update selinux tests to use shell from archive_dist_test
(cherry picked from commit 08e5f964cdb3fd71f7e7d1691797c4ece29ea1d8)
2022-05-18 16:55:24 -07:00
Cheahuychou Mao
79e48dd8b0 SERVER-66526 Hang upon restart when there is a prepared internal transaction for retryable findAndModify executed with storeFindAndModifyImagesInSideCollection=true to reconstruct
(cherry picked from commit 13a610d118)
2022-05-18 22:22:33 +00:00
Randolph Tan
8035d1b6c1 SERVER-66264 shardsvrDropIndex should use timeseries namespace in the shardVersionRetry loop
(cherry picked from commit d5a929be4f)
2022-05-18 13:17:23 -04:00
David Bradford
d9c20985e2 SERVER-66518: Include packaging as part of powercycle dependencies
(cherry picked from commit 2bca294623)
2022-05-17 15:04:53 -04:00
Rachita Dhawan
ce47119ff1 SERVER-62175 Mongos fails to attach RetryableWrite Error Label For Command Interrupted In _parseCommand
(cherry picked from commit 38e4a5516d)
2022-05-17 15:48:13 +00:00
James Wahlin
387db2d0f7 Revert "SERVER-65884 $lookup from ts optimize $sequentialCache"
This reverts commit 252235fda4.
2022-05-17 15:24:59 +00:00
Andrii Dobroshynski
df8faf83a1 SERVER-65152 Update change_stream_null_existence_eq_rewrite_test.js for newly-added events
(cherry picked from commit 5a611b4f0d)
2022-05-17 14:08:19 +00:00
Jordi Serra Torrens
c900fa624c SERVER-65947 MigrationDestinationManager must recover if an error occurs during release of the critical section
(cherry picked from commit 5bd946b1fc)
2022-05-17 13:24:50 +00:00
Mindaugas Malinauskas
7aa9056354 SERVER-66075 Make change_streams_pre_image_removal_job.js tolerate transient CappedPositionLost errors when reading the oplog
(cherry picked from commit 7de665954a)
2022-05-17 13:20:37 +00:00
David Bradford
5c8894d8e0 SERVER-65937: Support different fcv tags for lts and continuous multiversion tests
(cherry picked from commit 3b4067a108)
2022-05-17 12:57:34 +00:00
Allison Easton
1a44e197ee SERVER-65930 DDL coordinators and rename participant initial checkpoint may incur in DuplicateKey error 2022-05-17 12:03:40 +00:00
Pierlauro Sciarelli
76fce4412c SERVER-66031 fix fcv document retrieval in jstests/sharding/rename_sharded.js 2022-05-17 10:22:33 +00:00
Paolo Polato
ede5f0da8f SERVER-66377 make ClusterChunksResizePolicy resilient to renameCollection() with dropTarget
(cherry picked from commit 46c54afca7)
2022-05-17 09:12:08 +00:00
Mohammad Dashti
dd511e9140 SERVER-66498 Disable Baseline JIT for MozJS
(cherry picked from commit 13ec926abf)
2022-05-17 05:15:08 +00:00
Mark Benvenuto
33f01c2958 SERVER-66120 Use consistent way to refer to FLE 2 encryption in user-facing messages
(cherry picked from commit ad2271e4c9)
2022-05-17 03:25:41 +00:00
Erwin Pe
86483f603c SERVER-65999 Fix the sharding test for two simultaneous compacts
(cherry picked from commit a86cebf1f3)
2022-05-17 03:02:21 +00:00
Mihai Andrei
7ed364e892 SERVER-66445 Make the classic engine the default execution engine
(cherry picked from commit 40109e237a)
2022-05-17 02:38:30 +00:00
ruslan.abdulkhalikov
252235fda4 SERVER-65884 $lookup from ts optimize $sequentialCache
(cherry picked from commit a672dcd565)
2022-05-17 02:02:30 +00:00
Varun Ravichandran
4ad4646e08 SERVER-66082: Propagate cluster server parameters to new nodes during file-copy based initial sync
(cherry picked from commit 33ced84ad3)
2022-05-16 22:59:43 +00:00
Tausif Rahman
c7801e8a9c Revert "SERVER-64332 added macos binary signing to push task"
(cherry picked from commit dff7548def)
2022-05-16 22:37:26 +00:00
Kyle Suarez
807371ef59 SERVER-65699 delete test-only 'sbe' command 2022-05-16 21:03:13 +00:00
Kyle Suarez
5cc18bcd68 SERVER-65859 Enable filtering of 'fromMigrate' change steam events for individual operations within applyOps array 2022-05-16 20:19:29 +00:00
Henrik Edin
04e49a5d48 SERVER-66139 Disable oplog visibility in standalone mode
(cherry picked from commit fbdcf79b38)
2022-05-16 19:19:55 +00:00
Pierlauro Sciarelli
feb2dfc188 SERVER-66031 rename must succeed on all shards when UUIDs provided for C2C 2022-05-16 17:39:57 +00:00
Paolo Polato
5b39b570b4 SERVER-66383 Persist the progress of ClusterChunksResizePolicy without holding the state mutex
(cherry picked from commit bbd45c53cc)
2022-05-16 16:59:50 +00:00
Paolo Polato
34b7213aee SERVER-65956 fix minor bugs in defragmentation source code/tests
(cherry picked from commit 4afa98e3a4)
2022-05-16 16:58:35 +00:00
Paolo Polato
4ad560df78 SERVER-65956 Skip split phase of collection defragmentation based on feature flag
(cherry picked from commit 7e7e34fb67)
2022-05-16 16:58:35 +00:00
Matthew Russotto
fa5d029fd8 SERVER-66089 Initial sync should do transaction table read with a later afterClusterTime.
(cherry picked from commit 878b6bb324)
2022-05-16 16:35:44 +00:00
Mihai Andrei
6501f4a1e5 SERVER-66354 Additional $search metadata pipeline should use separate ExpressionContext (cherry picked from commit d3d37be21f) 2022-05-16 15:13:13 +00:00
Antonio Fuschetto
082481b93b SERVER-66423 Set the fromMigrate flag of DurableReplOperation entries only when FCV is 6.0 or greater 2022-05-16 10:23:19 +00:00
Haley Connelly
1099c28828 SERVER-65916 Prevent batched_multi_deletes_failover.js from stalling on failpoint
(cherry picked from commit d7cf7fead4)
2022-05-16 09:39:30 +00:00
Andrew Morrow
3972a090fa SERVER-64352 Don't attempt to notarize the test shell
(cherry picked from commit 1d4d6b6f83)
2022-05-13 15:30:08 +00:00
Sergi Mateo Bellido
f9bf6f1799 SERVER-64433 Recovering the topology tick points on startup/init sync
(cherry picked from commit cc33146088)
2022-05-13 13:33:42 +00:00
David Storch
94ebb3709d SERVER-66389 Fix $where parameter bind-in optimization
(cherry picked from commit 48acc21bc9)
2022-05-13 08:01:47 +00:00
Alexander Neben
3645d402d7 SERVER-64352 mongo shell no longer built by default
(cherry picked from commit f59190ee55876c17de0ba92aaae9d2b369cdf901)
2022-05-13 01:48:10 +00:00
Davis Haupt
465ca1e459 SERVER-66366 remove encryptionInformation after rewriting update and delete requests for explain commands 2022-05-13 00:21:27 +00:00
Vesselina Ratcheva
1abb269878 SERVER-64628 Add more targeted tests for adding nodes to sharded sets
(cherry picked from commit 181a405baf)
2022-05-12 22:22:28 +00:00
Amirsaman Memaripour
e1d4cd0bff SERVER-59400 Revert "SERVER-55581: Return ScopedDbConnection to connection pool in cluster aggregation planner"
This reverts commit 663e90bbe8.

(cherry picked from commit 81fa710687)
2022-05-12 19:37:55 +00:00
Cheahuychou Mao
d8d9369e77 SERVER-65641 Add test coverage for reaping a session with active TransactionParticipant and TransactionRouter yielders
(cherry picked from commit 879d439c78)
2022-05-12 18:36:31 +00:00
Brian McCarthy
364c14723d SERVER-66386 Update AMI images for package tests
(cherry picked from commit 558e2dfd2c)
2022-05-12 14:40:04 +00:00
Paolo Polato
0add35fc62 Revert "SERVER-65831 Use ScopedTaskExecutor to speed up BalancerCommandsScheduler stop()"
This reverts commit 00275096d6.
2022-05-12 11:45:12 +00:00
Antonio Fuschetto
5b9077c974 SERVER-66312 Tests on batched operations do not involve orphaned documents 2022-05-12 11:19:46 +00:00
Antonio Fuschetto
8c9ceb09f2 SERVER-65858 Mark the applyOps entries when the operations involves orphaned documents 2022-05-12 10:21:06 +00:00
Luke Chen
7dc5d8f8ef Import wiredtiger: c2a7ed8278fa29430cd51d5e6ae9815f9fba2850 from branch mongodb-6.0
ref: 799bf81c4b..c2a7ed8278
for: 6.0.0-rc6

WT-9251       Perform log flush before the metadata checkpoint
2022-05-12 07:39:43 +00:00
Luke Chen
eb236125bc Import wiredtiger: 799bf81c4b6546b4edccaaa985077de8e69a4e99 from branch mongodb-6.0
ref: ed5f8423a8..799bf81c4b
for: 6.0.0-rc6

WT-9304       Fix checkpoint not to read deleted pages into cache
2022-05-12 07:39:43 +00:00
Luke Chen
8e4809dbac Import wiredtiger: ed5f8423a825c363f913be25c52a4ffdfc59d679 from branch mongodb-6.0
ref: 50aa449b70..ed5f8423a8
for: 6.0.0-rc6

WT-9176       Set operation rate to 10ms for update threads in operations_test
2022-05-12 07:39:43 +00:00
Luke Chen
23bea78e48 Import wiredtiger: 50aa449b701f987e5c5379379cc2c99054872b2a from branch mongodb-6.0
ref: ba455f3c9b..50aa449b70
for: 6.0.0-rc6

WT-8152       Remove stat_db_size runtime check from operations_test and rename cpp evergreen tasks
2022-05-12 07:39:42 +00:00
Benety Goh
3ea669ee44 SERVER-66319 dbcheck_no_history_on_secondary.js waits for dbCheck hasher to start
(cherry picked from commit 3ba08e75e5)
2022-05-12 00:02:40 +00:00
Jack Mulrow
27c9677322 SERVER-66316 Make transactions API interact better with Client Side Operation Timeout
(cherry picked from commit 2102f99116)
2022-05-11 22:18:10 +00:00
Benety Goh
5bef21c71b SERVER-66319 use bulk inserts to speed up dbcheck test
(cherry picked from commit 2daf151f5a)
2022-05-11 21:35:57 +00:00
Charlie Swanson
768de6a405 SERVER-65692 $searchMeta improvement 2022-05-11 20:20:17 +00:00
David Bradford
a2dfdccced SERVER-64731: Use version level task generation
(cherry picked from commit c1638c0ae3)
2022-05-11 17:12:11 +00:00
Alexander Neben
ca933f3c06 SERVER-66113 Add link to mongo shell in enterprise install
(cherry picked from commit 5f5b619e60)
2022-05-11 16:32:01 +00:00
Jack Mulrow
08362ea0dc SERVER-66375 Retry all operations on killed session errors in random_moveChunk_update_shard_key_kill_sessions.js
(cherry picked from commit 4201be5dc4)
2022-05-11 15:25:26 +00:00
Mark Benvenuto
d982d52961 SERVER-66085 Evaluate creating state collections as clustered collections
(cherry picked from commit 4baba7c9f1)
2022-05-11 15:00:19 +00:00
Mark Benvenuto
669b63d34b SERVER-66317 Make owned bson copies for txn api threads
(cherry picked from commit cc0335394b)
2022-05-11 15:00:19 +00:00
Jack Mulrow
7bfa67c512 SERVER-66299 Read random document with linearizable read concern in internal_transactions_unsharded.js
(cherry picked from commit 7ef3dda0e9)
2022-05-11 01:56:09 +00:00
Yuhong Zhang
142cdf278f SERVER-65797 Remove invalid index specs in memory before parsing for listIndexes 2022-05-10 21:56:51 +00:00
David Bradford
440d4679cc SERVER-66343: Increase timeout for mac run_unittests
(cherry picked from commit 167fbe34c3)
2022-05-10 18:53:27 +00:00
Mark Benvenuto
12ef2a3601 SERVER-65503 Remove FLE2 suites from standalone suites
(cherry picked from commit 2d42bc1dec)
2022-05-10 18:29:25 +00:00
Mark Benvenuto
4b8e74e9f9 SERVER-65503 Migrate FLE2 tests to core passthrough suites
(cherry picked from commit 5325fff3f0)
2022-05-10 18:29:25 +00:00
David Bradford
a88f6f47d2 SERVER-65835: Refactor how task timeouts are determined
(cherry picked from commit 1f60e18fd7)
2022-05-10 18:07:12 +00:00
Cheahuychou Mao
c4bfdc5ff5 SERVER-65638 Add concurrency workload that changes FCV while there are active internal transactions started using test command 2022-05-10 15:16:59 +00:00
Gregory Noma
d9acfef2b9 SERVER-65821 Allow prepared transactions to write commit decision across FCV barrier
(cherry picked from commit 5f15e515c6)
2022-05-10 14:41:33 +00:00
Arun Banala
c6d13552e8 SERVER-66307 [v6.0]Set $_generateV2ResumeTokens parameter only on mongos 2022-05-10 11:36:35 +00:00
Benety Goh
62d427c2bb SERVER-64659 add multiple index spec test case for indexBulkBuilder server status section
(cherry picked from commit e2abe094a3)
2022-05-10 10:53:41 +00:00
Kaloian Manassiev
882b0d9dcf SERVER-66236 Always return UNSHARDED description on uninitialised cluster
(cherry picked from commit 4deeaf72d5)
2022-05-10 06:39:08 +00:00
Yoonsoo Kim
201d38029b SERVER-65863 Have optimized _id expression(s) pushed down properly
(cherry picked from commit 7f55c45773)
2022-05-10 05:39:01 +00:00
Israel Hsu
cb28b28ae6 SERVER-65983 Remove unnecessary internal_txns tests
(cherry picked from commit b3515cdffb)
2022-05-10 03:09:21 +00:00
Jack Mulrow
dd38d4917d SERVER-66320 Wait for thread pool to be idle before resetting TransactionWithRetries in unit tests
(cherry picked from commit afe31bee0b)
2022-05-10 02:45:07 +00:00
Cheahuychou Mao
a615e9b7bc SERVER-66296 ReshardingOplogBatchApplier and ReshardingTxnCloner should wait for conflicting transaction to complete upon hitting RetryableTransactionInProgress
(cherry picked from commit a7f575b9c7)
2022-05-10 01:25:49 +00:00
samontea
6e40c0c55d SERVER-52286 Enable feature flag for Bucket Unpacking with Sorting, reduce FCV to 6.0 2022-05-09 23:49:27 +00:00
Alexander Ignatyev
15c5431298 SERVER-66163 Use index entry from IXScan to report IET
(cherry picked from commit 39ccb28e09)
2022-05-09 22:28:39 +00:00
Davis Haupt
5b6dfa1690 SERVER-64911 Add create, collMod and createIndexes to list of commands to send to encryption 2022-05-09 21:30:51 +00:00
Mark Benvenuto
a13b628c6e SERVER-66064 Fix fast count when authentication is enabled
(cherry picked from commit ee12644af8)
2022-05-09 19:23:36 +00:00
Mark Benvenuto
69ce4e6656 SERVER-66064 Optimize FLE2 document counting
(cherry picked from commit c23236c1b6)
2022-05-09 19:23:36 +00:00
Mark Benvenuto
9707fb81cb SERVER-66186 Optimize ECC null document storage
(cherry picked from commit 64ebed9cdd)
2022-05-09 18:58:58 +00:00
Arun Banala
2cfe1b9e8e Revert "SERVER-66307 [v6.0]Set $_generateV2ResumeTokens parameter only on mongos"
This reverts commit 0056ecb9c07a317e93e1bef083efa4462f21f7a0.
2022-05-09 17:13:26 +00:00
Sergi Mateo Bellido
d66184cb6e SERVER-64601 Using the onInitialDataAvailable hook to initialize
sharding environment

(cherry picked from commit bf1b133ade)
2022-05-09 15:43:01 +00:00
Jordi Olivares Provencio
7774cd9bc4 SERVER-64467 Refactor TicketHolders to not use global context
(cherry picked from commit e399b6676c)
2022-05-09 15:19:34 +00:00
Arun Banala
486b3428d8 SERVER-66307 [v6.0]Set $_generateV2ResumeTokens parameter only on mongos 2022-05-09 14:53:39 +00:00
Irina Yatsenko
5a4e56115f SERVER-66119 Avoid duplicated seek into index for local fields with nested arrays
(cherry picked from commit 96b8052c9e34423534ac610fcb5b11bca7239d12)
2022-05-09 14:18:16 +00:00
Denis Grebennicov
8bdca7b05b SERVER-65847 Construct simpler parameterized SBE index scan plans when possible 2022-05-09 13:14:56 +00:00
Anton Korshunov
b690dde464 SERVER-66233 Tag index_filter_commands.js with requires_fcv _60
(cherry picked from commit bae75df363)
2022-05-09 11:27:23 +00:00
Benety Goh
e8f6336784 SERVER-64659 add initial sync test case for indexBulkBuilder server status section
(cherry picked from commit 4adfa1a54c)
2022-05-09 10:21:01 +00:00
Cheahuychou Mao
2b32a92fcc SERVER-65638 Make internal_transactions_unsharded.js track dirty documents and retry_on_killed_session.js only retry idempotent operations
(cherry picked from commit 6575cefe29)
2022-05-08 21:44:00 +00:00
Ruoxin Xu
a4e55674d1 SERVER-66209 Make BSONObjs owned when constructing a DebugInfo
(cherry picked from commit 5c38a29c5b)
2022-05-07 13:47:54 +00:00
Mohammad Dashti
bdb54b6d65 SERVER-66302 Removed 'JS_SetGlobalJitCompilerOption' calls to avoid a possible race condition
(cherry picked from commit c3765031e1)
2022-05-07 09:10:14 +00:00
Eric Cox
5f3510b1b1 SERVER-64735 Fix uninitialized pointer field in HashLookupStage
(cherry picked from commit ba5b14fdf7)
2022-05-06 22:26:31 +00:00
Dan Larkin-York
71305cfbc1 SERVER-64769 Make sure bounded sorter provides sort key for sharded mergesort 2022-05-06 19:33:26 +00:00
Dan Larkin-York
c4577480b3 SERVER-65406 Handle compressed buckets in timeseries dotted path support library 2022-05-06 18:34:06 +00:00
Gregory Wlodarek
8adb070dcb SERVER-62102 Append aggregated BucketCatalog execution stats for all namespaces to ServerStatus 2022-05-06 17:57:36 +00:00
Sanika Phanse
2d2290fe81 SERVER-66067 Transaction API's best-effort abort can interfere with two-phase commit
(cherry picked from commit a9397139b7)
2022-05-06 16:46:46 +00:00
Zakhar Kleyman
a3ba59200f SERVER-62308 Platform Support: Remove Debian 9 2022-05-06 16:18:06 +00:00
David Percy
2e85e425b4 SERVER-65050 Optimize time-series sorting with point query on metadata 2022-05-06 14:52:08 +00:00
Paolo Polato
00275096d6 SERVER-65831 Use ScopedTaskExecutor to speed up BalancerCommandsScheduler stop()
(cherry picked from commit c10fb605ba)
2022-05-06 11:36:52 +00:00
Alexander Ignatyev
4f14082a6c SERVER-66245 Copy sbeCompatible flag for subqueries
(cherry picked from commit 6bf7fbe9ee)
2022-05-06 10:58:53 +00:00
Benety Goh
8f2a387c72 SERVER-64659 add external sorter file handle metrics to indexBulkBuilder server status section
(cherry picked from commit bfc606f1cc)
2022-05-06 10:35:24 +00:00
samontea
72852f034f SERVER-64349 Fix test file FCV 2022-05-06 02:03:39 +00:00
Jack Mulrow
568789beb7 SERVER-66222 Retryable transactions should reject multi writes with an initialized statement id
(cherry picked from commit 883238375b)
2022-05-05 22:10:22 +00:00
Alexander Ignatyev
3b505f1957 SERVER-65345 Check if CanonicalQuery has pushed down stages
(cherry picked from commit 8aa42af064)
2022-05-05 21:21:13 +00:00
Erwin Pe
f32cf4f2d0 SERVER-66167 remove case for deleting all esc/ecc entries in compact
(cherry picked from commit 32ea347de8)
2022-05-05 19:09:34 +00:00
Joel Redman
95d09aba88 SERVER-65541 Fix coverity uninitialized member in CollectionScanNode 2022-05-05 18:27:52 +00:00
Romans Kasperovics
a70e930841 SERVER-65460 Set allowDiskUse to false in read-only mode 2022-05-05 15:59:23 +00:00
Mark Benvenuto
0d025d08cf SERVER-65832 Block mongod CompactStructuredEncryptionData on shard server
(cherry picked from commit 671486e7ba)
2022-05-05 15:57:25 +00:00
Erwin Pe
b29f1a82f9 SERVER-65483 Add tests for compact contention with concurrent FLE2 inserts and deletes
(cherry picked from commit d457616e6a)
2022-05-05 15:57:25 +00:00
Erwin Pe
b318215fa7 SERVER-65431 Disallow renaming to/from a collection with encrypted fields
(cherry picked from commit 3904aa02b4)
2022-05-05 15:34:06 +00:00
Varun Ravichandran
4eb4a309af SERVER-65810: Disable test-only cluster server parameters when enableTestCommands is false
(cherry picked from commit 0047a5b2e8)
2022-05-05 14:37:42 +00:00
Benety Goh
be69831f52 SERVER-64659 add resumable index build counter to indexBulkBuild server status section
(cherry picked from commit 0c40fc644d)
2022-05-05 11:02:43 +00:00
Denis Grebennicov
1723856986 SERVER-61485 Wrong SBE plan reported by explain() for rejected plans 2022-05-05 10:25:47 +00:00
Luke Chen
728342e382 Import wiredtiger: ba455f3c9bd7c3fd1d2b43fb659c53f9822c0c6b from branch mongodb-6.0
ref: d8fc01e023..ba455f3c9b
for: 6.0.0-rc5

WT-9249       Compare and fix the start durable timestamp if it is greater than ooo timestamp
2022-05-05 05:35:15 +00:00
Luke Chen
f37bd161f0 Import wiredtiger: d8fc01e0235d9eda1fc149d7adb723add0862025 from branch mongodb-6.0
ref: 0393d02cd3..d8fc01e023
for: 6.0.0-rc5

WT-8431       Increase test_hs14 cache size to reduce eviction activity
2022-05-05 05:35:15 +00:00
Cheahuychou Mao
c21af7e992 SERVER-66110 Downgrading FCV can cause the active txnNumber on TransactionParticipant to change between session yielding and unyielding
(cherry picked from commit 6d06540e28)
2022-05-05 00:38:36 +00:00
Jack Mulrow
300f2eed08 SERVER-66090 Make mongod service entry point resilient to session yielding
(cherry picked from commit e63da638a1)
2022-05-04 21:47:54 +00:00
Mark Benvenuto
79942357f7 SERVER-65167 Remove usage of std:tie in fle_crud.cpp
(cherry picked from commit 3df96ded70)
2022-05-04 21:24:15 +00:00
sergey.galtsev
4a8d40cb6e SERVER-63703 eliminate openssl dependency on csfle 2022-05-04 20:05:04 +00:00
Cheahuychou Mao
387a30c6a3 SERVER-66211 setFCV downgrade can overwrite the state for the latest txnNumber during internal transactions config.transactions entries removal 2022-05-04 19:41:26 +00:00
David Storch
a616699c51 SERVER-64315 Re-enable caching of SBE plans when there is a single query solution
This reverts commit f8589f840c.

(cherry picked from commit f462237ac1)
2022-05-04 18:11:43 +00:00
Alexander Ignatyev
3c0df34e8a SERVER-65793 Do not parameterize queries with TEXT match expression node
(cherry picked from commit 9ca1d39e1a)
2022-05-04 17:24:34 +00:00
Ted Tuckman
b8cde770ab SERVER-55112 Make distinct on a view match distinct on a collection for certain array cases 2022-05-04 16:06:17 +00:00
Benety Goh
b4950d6e53 SERVER-64659 fix lint 2022-05-04 13:33:26 +00:00
Benety Goh
5659527d24 SERVER-64659 add indexBulkBuilder server status section with minimal creation metrics
(cherry picked from commit adc47cc974)
2022-05-04 11:08:41 +00:00
Max Hirschhorn
fbb5573629 SERVER-66088 Create separate indexes for resharding test to drop.
Due to a StaleConfig exception, the _shardsvrDropIndexes command may
automatically retry the dropIndexes command after the resharding
operation has succeeded and lead to a spurious IndexNotFound error.
While the _shardsvrDropIndexes and dropIndexes shard commands from the
resharding_disallow_writes.js test have a maxTimeMSOpOnly attached, on
platforms with less precise clocks (namely Windows), there may still be
sufficient time for a retry to go through from the primary shard even
after the initial dropIndexes request had timed out on mongos.

(cherry picked from commit 73938f0e9a)
2022-05-03 23:51:55 +00:00
Paolo Polato
5b1fe61d1a SERVER-66008 fix undefined function bug in cluster.js
(cherry picked from commit 782e90f7ae)
2022-05-03 21:17:35 +00:00
Benety Goh
725536e395 SERVER-64659 Sorter::File accepts optional SorterFileStats for tracking file open/close operations
(cherry picked from commit 176747132c)
2022-05-03 20:43:56 +00:00
Gregory Wlodarek
4bd72a14ee SERVER-66140 Run simulate_crash.py hook with testing diagnostics enabled
(cherry picked from commit 062791e149)
2022-05-03 19:51:19 +00:00
samontea
3151bf2f90 SERVER-64349 Add heuristic-based planning support for bucket unpacking with sort 2022-05-03 17:56:04 +00:00
Marcos José Grillo Ramirez
20c5441714 SERVER-65643 Exclude set_cluster_parameter.js test from inMemory variants
(cherry picked from commit 18d5328e20)
2022-05-03 17:32:27 +00:00
Benety Goh
919f4cc6ce SERVER-64659 move sorter.h include to IndexAccessMethod cpp file
(cherry picked from commit dbbf2c0689)
2022-05-03 17:29:07 +00:00
Hana Pearlman
6cc72824de SERVER-62287: Reenable aggregation fuzzers 2022-05-03 17:05:38 +00:00
David Storch
6c2b8f53b4 SERVER-66015 Distinguish simple and non-simple regexes in SBE plan cache key
(cherry picked from commit 2cee6cb397)
2022-05-03 13:48:23 +00:00
Allison Easton
a2958974d4 SERVER-65015 Granular locks for synchronizing orphans tracking 2022-05-03 12:34:00 +00:00
Ruoxin Xu
279da2ed41 SERVER-65897 Remove SBE plan cache entries from the corresponding collection when an index filter is set or cleared
(cherry picked from commit 4ecf46e108)
2022-05-03 09:57:30 +00:00
Paolo Polato
5e73659a3c SERVER-65649 Throttle merge/split chunk ops issued by the balancer
(cherry picked from commit 91c4696df9)
2022-05-03 09:24:05 +00:00
Luke Chen
ff5e921b93 Import wiredtiger: 0393d02cd3a826511c57698e5110e15c50559a80 from branch mongodb-6.0
ref: 396f900428..0393d02cd3
for: 6.0.0-rc4

WT-9029       Remove object_target_size option from WT_SESSION::create
WT-9255       Disable certain tests for mongodb-6.0 branch
2022-05-03 05:34:51 +00:00
Romans Kasperovics
5f60d59336 SERVER-65319 Count explicit use of allowDiskUse:false 2022-05-03 01:14:49 +00:00
Sanika Phanse
1fafce5685 SERVER-64194 Add test coverage for refreshFromStorageIfNeeded() for a retryable internal transaction with write statements with kUninitializedStmtId
(cherry picked from commit 500de2dcb8)
2022-05-02 22:12:36 +00:00
Cheahuychou Mao
91db229de6 SERVER-66104 Make internal_transactions_transient_error_after_setFCV.js check for InternalTransactionNotSupported in writeErrors instead
InternalTransactionNotSupported is no longer a transient transation
error so it is returned as a write error instead of as a top-level
error
2022-05-02 19:43:00 +00:00
Cheahuychou Mao
b33af4ceaf SERVER-66104 Not label InternalTransactionNotSupported as a transient transaction error
(cherry picked from commit 3bef8610d3)
2022-05-02 17:46:29 +00:00
Jack Mulrow
b8e2306d66 SERVER-66029 Fix lifetime of timers in refineCollectionShardKey transaction callback
(cherry picked from commit 5cf29656a8)
2022-05-02 16:27:09 +00:00
Christopher Caplinger
bf5b9ae54f SERVER-65439: Conditionally set multikey paths when indexing records
(cherry picked from commit 51b92630cc)
2022-05-02 14:35:49 +00:00
Pierlauro Sciarelli
683a68904e SERVER-66070 MigrationSourceManager::getMigrationStatusReport must expect optional max bound 2022-05-02 10:29:00 +00:00
Cheahuychou Mao
f8efe6a88b SERVER-65436 Make autosplit_setFCV_downgrade_from_60.js set the FCV back to latest during teardown 2022-04-30 03:57:44 +00:00
Gregory Wlodarek
94a8935df8 SERVER-66080 SimulateCrash hook waits for mongod to stop before copying data files
(cherry picked from commit f121c23374)
2022-04-29 23:25:12 +00:00
ruslan.abdulkhalikov
735345972e SERVER-65808 support $search as subpipeline of $lookup with localField+foreignField
(cherry picked from commit 736d9efe5ef102c2d4e5de5d268787030cd4c346)
2022-04-29 18:58:29 +00:00
Nikita Lapkov
6017abecf4 SERVER-65961 Copy only BSON types during yielding of SBE plans
(cherry picked from commit a88230980f)
2022-04-29 18:35:18 +00:00
Cheahuychou Mao
e6b54429de SERVER-65993 Make internal transaction concurrency workloads create test collection in the setup phase with w: majority
(cherry picked from commit dc51c89abf)
2022-04-29 17:55:56 +00:00
Cheahuychou Mao
9dedc55e66 SERVER-65988 Make TransactionCoordinator log full session ids
(cherry picked from commit ba809f2d90)
2022-04-29 17:21:25 +00:00
Cheahuychou Mao
ca7108a1b0 SERVER-65640 Add concurrency workload that performs resharding while there are active internal transactions started using test command
(cherry picked from commit e4bb8a1218)
2022-04-29 17:21:25 +00:00
Cheahuychou Mao
6259f8d9fd SERVER-64986 Make maxClusterTime not default to null timestmap
(cherry picked from commit 0157495746)
2022-04-29 17:21:25 +00:00
Cheahuychou Mao
faaccd35af SERVER-64986 Make internal transactions concurrency workloads retry testInternalTransactions commands that are run as retryable writes
(cherry picked from commit c8e87a7de9)
2022-04-29 17:21:25 +00:00
Cheahuychou Mao
d81e854994 SERVER-64986 Add concurrency workloads that test internal transactions using test command
(cherry picked from commit 5da689d92c)
2022-04-29 17:21:25 +00:00
Matthew Russotto
0040c5f716 SERVER-65788 Do not hold Global lock when calling startDataReplication
(cherry picked from commit 67a207b721)
2022-04-29 16:42:01 +00:00
Vesselina Ratcheva
064111fc4e SERVER-64627 Refactor onInitialSyncComplete and onStartupRecoveryComplete into new sharding hook that also works with FCBIS
(cherry picked from commit 14e04b0acc)
2022-04-29 13:44:40 +00:00
Luke Chen
2c3982e085 Import wiredtiger: 396f9004282cf8a8d8d7580dfea065ca0352f3d8 from branch mongodb-6.0
ref: 5003f657b0..396f900428
for: 6.0.0-rc4

WT-8234       Prevent eviction of internal pages while reconciling leaf pages which could refer to their memory
WT-9177       Fix deadlock with checkpoint waiting for transactions to complete
2022-04-29 10:00:53 +00:00
Pierlauro Sciarelli
e714e06e04 SERVER-66041 Chunk cloner must never consider too big a chunk with only one document 2022-04-29 09:37:14 +00:00
Allison Easton
82ca5be473 SERVER-65436 Create FSM workload to test chunk splitting on downgrade
(cherry picked from commit 9ecc0667d4)

SERVER-65911 Disable autosplit_setFCV_downgrade_from_60.js on multiversion

(cherry picked from commit 1a3dcd8bf0)
2022-04-29 06:45:49 +00:00
Ted Tuckman
2f3c902495 SERVER-66009 Avoid use of mongo process interface if search is in an update pipeline 2022-04-28 23:17:37 +00:00
Mohammad Dashti
4c05fd8607 SERVER-65773 Improved MozJS error handling
(cherry picked from commit 6808bcf11e)
2022-04-28 22:55:48 +00:00
Jon Streets
b3598e71a2 SERVER-66049 add csfle push task to AL2 ARM
(cherry picked from commit 1423d114a13b61754744c73cf18d794b81e9b87f)
2022-04-28 22:20:38 +00:00
Cheahuychou Mao
715c8344c0 SERVER-66032 Secondary oplog application failure for prepared internal transactions that span an FCV change
(cherry picked from commit ef9865164e)
2022-04-28 20:28:35 +00:00
Cheahuychou Mao
76e25c8ede SERVER-65998 Fix expected document in random_moveChunk_update_shard_key.js
(cherry picked from commit f9a606edcc)
2022-04-28 20:28:35 +00:00
Jack Mulrow
1f1d8fdb23 SERVER-61782 SERVER-63835 Use futures in transaction API run implementation and simplify construction
(cherry picked from commit 06252c6c7d)
2022-04-28 18:56:21 +00:00
Cheahuychou Mao
fba4410371 SERVER-66054 Internal transactions in jstests/multiversion are not running on evergreen 2022-04-28 18:31:03 +00:00
Irina Yatsenko
03296e9bc9 SERVER-65929 Avoid profiling overhead in aggregation over SBE find when not actually profiling
(cherry picked from commit a1f721cd6b)
2022-04-28 16:52:25 +00:00
Rui Liu
ab43ff54c2 SERVER-66044 Fix feature flag assertion in lookup_unionWith_subpipeline_local_read.js
(cherry picked from commit d40ef71d68)
2022-04-28 16:25:35 +00:00
Mark Benvenuto
da36a1747b SERVER-64514 Blackduck check return code, update third_party_components.yml
(cherry picked from commit b4fd6d05d7)
2022-04-28 15:46:37 +00:00
Yuhong Zhang
c32b4ba278 SERVER-65922 Allow duplicate keys to be inserted before the index build with the prepareUnique option commits
(cherry picked from commit b61476a952)
2022-04-28 15:23:50 +00:00
Yuhong Zhang
292b6b8a23 SERVER-65922 Disallow unique and prepareUnique to exist in the index spec together
(cherry picked from commit fcb9d766b6)
2022-04-28 15:23:50 +00:00
Arun Banala
d6e452e89c SERVER-66017 Always include operationDescription in v2 resume token for rename events
(cherry picked from commit 6d0743c76fd5c7fc7aa018ac043e3adc983a7c16)
2022-04-28 14:16:26 +00:00
Allison Easton
e6ee576307 SERVER-64285 Create indexes on config.rangeDeletions
(cherry picked from commit 0d1f974d01)
2022-04-28 08:50:13 +00:00
Robert Guo
39027673be SERVER-65071 remove resmoke gRPC integration
(cherry picked from commit 9563cadc7d)
2022-04-28 07:49:37 +00:00
Ryan Egesdahl
f4feff2da9 SERVER-64803 Check for C99 libc headers during build
(cherry picked from commit 8e9d522792)
2022-04-27 19:44:02 +00:00
Jon Streets
adcf4bfa75 SERVER-66013 change CSFLE ARM build host from x86 to ARM
(cherry picked from commit 8f3c0917a06575fde0ee04a43b11d3e36d73bc57)
2022-04-27 19:18:19 +00:00
Henrik Edin
aa0eff62c5 SERVER-65501 Re-start interleaved object compression when scalar field is encountered as object
This makes the behavior the same as when going from object to scalar.

(cherry picked from commit 8566a0723b)
2022-04-27 18:48:24 +00:00
Jon Streets
db97f4f48f SERVER-65944 Add csfle build and push to Ent RHEL 8 x86
(cherry picked from commit c5b934f586dba4c01a65b0a7830a4d15f8cf6614)
2022-04-27 18:21:14 +00:00
Daniel Moody
8d2be1e9b0 SERVER-64332 skip macos notarization for archives which don't exist.
(cherry picked from commit 92e728ced8)
2022-04-27 17:21:14 +00:00
Arun Banala
f97cda3761 SERVER-63864 Add tests to validate change stream namespace and operationType rewrites for newly added events
(cherry picked from commit 7e8ebefc2f)
2022-04-27 16:48:13 +00:00
Ruoxin Xu
4ce1a04a1d SERVER-65532 Avoid calls to fillOutSecondaryCollectionsInformation() in PrepareExecutionHelper
(cherry picked from commit c516a8fc88)
2022-04-27 14:31:18 +00:00
Paolo Polato
d0e66009f7 SERVER-65811 Adjust set of expected errors in migration_coordinator_abort_failover.js
(cherry picked from commit f08cda52ec)
2022-04-27 11:51:31 +00:00
Marcos José Grillo Ramirez
b74b7a6efb SERVER-65386 Change add shard behavior to absorb shard cluster's parameters when promoting first RS to shard
(cherry picked from commit c78b6a067d)
2022-04-27 11:27:48 +00:00
Ruoxin Xu
53bed7ef77 SERVER-63344 Avoid cloning the SBE tree inside the plan cache mutex
(cherry picked from commit 2c0f447cff)
2022-04-27 11:04:52 +00:00
Denis Grebennicov
f1bdce4f8e SERVER-65085 SBE plan cache entries can be incorrectly reused after a refineCollectionShardKey operation 2022-04-27 10:40:57 +00:00
Pierlauro Sciarelli
d3b3466b49 SERVER-64817 Compute missing bound of moveRange within MigrationSourceManager 2022-04-27 10:14:49 +00:00
Tommaso Tocci
dfbc0da153 SERVER-65705 avoid division by zero in ShardsvrGetStatsForBalancing
(cherry picked from commit 1aa6b2bba7)
2022-04-27 09:15:16 +00:00
Billy Donahue
75cf260b4e SERVER-62656 optional minmax for CSRS pools
(cherry picked from commit b0b3890bdf)
2022-04-26 21:52:03 +00:00
Cheahuychou Mao
b7d4aa803c SERVER-65973 Disable remaining internal transactions tests that involve restarts on the inMemory variants
(cherry picked from commit 1d78938bfc)
2022-04-26 20:51:53 +00:00
David Bradford
b28dbf4657 SERVER-65672: pin crypography dependency
(cherry picked from commit 220004ef36)
2022-04-26 20:28:23 +00:00
Gabriel Marks
08f44d0fbe SERVER-63155 Re-enable ssl_cert_selector_apple.js 2022-04-26 19:49:27 +00:00
Gabriel Marks
72560925f4 SERVER-62941 Add oplog server status to FTDC 2022-04-26 19:11:59 +00:00
Gregory Wlodarek
99b735f678 SERVER-65963 Check FCV before creating time-series measurement indexes 2022-04-26 17:56:47 +00:00
Nikita Lapkov
0310172914 SERVER-65665 Disable sparse indexes from SBE $lookup
(cherry picked from commit 568226e1d6)
2022-04-26 16:48:24 +00:00
Brett Nawrocki
909b71bf5c SERVER-65924 resharding_histogram_metrics.js checks totalCount or ops 2022-04-26 16:25:32 +00:00
Rui Liu
858359e671 SERVER-65826 Fix corrupted collection pointers saved in MultipleCollectionsAccessor
(cherry picked from commit 35f03b7ef5)
2022-04-26 13:49:23 +00:00
Denis Grebennicov
1bbb684e57 SERVER-65814 Avoid resetting system variables on plan recovery if they're not registered in RuntimeEnvironment 2022-04-26 12:54:45 +00:00
Gregory Wlodarek
2b31ab0050 SERVER-65945 Skip reporting simulate crash hook errors when a test failed
(cherry picked from commit 677bfe19c6)
2022-04-26 12:32:29 +00:00
Luke Chen
1b70d13966 Import wiredtiger: 5003f657b04bde3df73de6f655cbfbbc081cd252 from branch mongodb-6.0
ref: 7a7d6bf9ab..5003f657b0
for: 6.0.0-rc2

WT-9096       Fix search near returning wrong key/value sometimes when key doesn't exist
2022-04-26 05:56:27 +00:00
Robert Guo
225f3122c7 SERVER-62937 add testing coverage for graviton
(cherry picked from commit 06f4991248)
2022-04-26 01:31:20 +00:00
Erwin Pe
283f01d900 SERVER-65771 Add requires_ocsp_stapling tag to ocsp_ignore_irrelevant.js
(cherry picked from commit 7958342795)
2022-04-25 23:29:38 +00:00
Irina Yatsenko
03c459860f SERVER-65489 Make unwind of the terminal foreign key value conditioned on whether the value is an array
(cherry picked from commit 55c81877e5)
2022-04-25 21:11:52 +00:00
Randolph Tan
1256b11b0f SERVER-6491 Make dropIndexes take the distlock so it can never run in parallel with shardCollection
(cherry picked from commit 77ffcb1d04)
2022-04-25 14:20:24 +00:00
Bernard Gorman
78c459a1f7 SERVER-65497 Do not assume input document is unmodified in DSChangeStreamHandleTopologyChange
(cherry picked from commit c7b46ffe63)
2022-04-23 03:06:21 +00:00
Varun Ravichandran
d1d2bb4551 SERVER-62266: Serialize setClusterParameter and drop cluster parameter collection during FCV 6.0 downgrade
(cherry picked from commit ad30aeecc3)
2022-04-22 20:43:02 +00:00
Gabriel Marks
5e5533da02 SERVER-65749 Add requires_persistence to user_write_block_fcv.js
(cherry picked from commit 7fcb8ea874)
2022-04-22 19:44:46 +00:00
Mihai Andrei
11c1739246 SERVER-65695 Delete checks for atomic query knobs when getting secondary namespaces
(cherry picked from commit 8a5e1910c1)
2022-04-22 15:01:37 +00:00
Mihai Andrei
0a16e785f7 SERVER-65665 Disallow the use of indexes with partial filter expressions in INLJ (cherry picked from commit b02798f303) 2022-04-22 14:59:06 +00:00
Christopher Caplinger
e2409b8fe0 SERVER-65331: Skip additional multiversion tenant migration test
(cherry picked from commit ad27a9745b)
2022-04-22 14:34:42 +00:00
Denis Grebennicov
7a7e183392 SERVER-65779 Pass IndexBounds directly to the CheckBounds stage 2022-04-22 12:31:39 +00:00
Tommaso Tocci
d5bd5860f6 SERVER-65795 Ensure BalancerStatsRegitry async initialization is interrupted on stepdown
(cherry picked from commit 1a55384344)
2022-04-22 12:08:15 +00:00
Tommaso Tocci
92ae225510 SERVER-65887 Fix clang formatting 2022-04-22 11:40:08 +00:00
Daniel Moody
ba20d2b03c SERVER-64332 added macos binary signing to push task
(cherry picked from commit 8aee4d35ca)
2022-04-21 20:41:25 +00:00
Mihai Andrei
3baf83d4d0 SERVER-64412 Add FSM test for $lookup to verify correctness in the presence of yielding
(cherry picked from commit 207489e8d3)
2022-04-21 19:37:08 +00:00
Mickey. J Winters
7d6df44172 SERVER-65022 always report 'wallTime' in change stream event output 2022-04-21 19:01:45 +00:00
Irina Yatsenko
8b954eecbd SERVER-65772: Use consistent endinaness when (de)serializing during spilling in hash lookup
(cherry picked from commit f549d22363)
2022-04-21 18:32:06 +00:00
Pierlauro Sciarelli
da3fb1b55f SERVER-65802 Return NamespaceExists when dropTarget=false but unsharded target collection exists 2022-04-21 08:50:21 +00:00
Gregory Wlodarek
dfdb498723 SERVER-65849 Run simulate_crash.py hook with test commands enabled
(cherry picked from commit 51b3e37f59)
2022-04-21 01:33:45 +00:00
Jason Chan
8c438c6c73 SERVER-65825 Increase fassertOnLockTimeoutForStepUpDown default timeout to 30 seconds
(cherry picked from commit 7001f53ea5)
2022-04-20 23:30:24 +00:00
David Storch
80c7f100d9 SERVER-65477 Allow plan_cache_replanning.js to run with the SBE plan cache enabled
(cherry picked from commit 717d8209e0)
2022-04-20 18:58:25 +00:00
Jason Zhang
ec279adb4b SERVER-64793 Make exhaustiveFind asynchronous
(cherry picked from commit 06625aa0a8)
2022-04-20 18:05:45 +00:00
Jack Mulrow
db1f183c4e SERVER-61418 Use majority write concern for commit retries in transaction API
(cherry picked from commit c7c2fe1556)
2022-04-20 17:41:29 +00:00
Svilen Mihaylov
cd0f6dfc95 SERVER-65653 Fix expected output of optimizertest/FilterIndexingVariable under macos 2022-04-20 16:48:03 +00:00
David Storch
4ba6b85fcf SERVER-65083 Fix SBE plan cache index visibility bug
(cherry picked from commit 58219cc812)
2022-04-20 15:39:53 +00:00
Richard Samuels
adfd03d5eb SERVER-62992 Don't validate resmoke.ini and install_dir when using subcommands other than run
(cherry picked from commit a4aa57a45b)
2022-04-20 15:16:36 +00:00
Cheahuychou Mao
20ee2db68f SERVER-65344 findAndModify pre/post image noop oplog entry forged by the stage should have the same statement id as the CRUD oplog entry it corresponds to
(cherry picked from commit 38973eaf39)
2022-04-20 14:46:03 +00:00
Gregory Wlodarek
8e60f3488f SERVER-65576 Improve time-series index build performance on non-measurement indexes
(cherry picked from commit df2472d339)
2022-04-20 12:58:11 +00:00
Nicholas Zolnierz
92f1a8ecff SERVER-65654 Avoid using shorthand function notation in drop_index_during_lookup.js
(cherry picked from commit 8ad97ab6e1)
2022-04-20 12:11:47 +00:00
Tommaso Tocci
3c5383d382 SERVER-65536 Relax constraints on numer of records in ShardsvrGetStatsForBalancingCmd
(cherry picked from commit 170f9451a7)
2022-04-20 08:30:05 +00:00
Sanika Phanse
c8dea9f922 SERVER-65635 Tests running large txns do not have correct oplog entry sizes
(cherry picked from commit 6d5c93d1ad)
2022-04-19 19:10:04 +00:00
Sanika Phanse
e5bd4972ce SERVER-65048 Support retryable writes in internal_transactions_test_command
(cherry picked from commit e2ae4c71e1)
2022-04-19 18:47:05 +00:00
Ryan Egesdahl
2fabc0cc49 SERVER-65037 Add missing large_distro_name for ASAN builds on RHEL 8.0
(cherry picked from commit de94da75ce)
2022-04-19 16:45:11 +00:00
Sanika Phanse
8db6c3a296 SERVER-65450 Retry WCOS findAndModify commands in resharding_update_shard_key_in_retryable_writes.js on transient errors.
(cherry picked from commit ff625342a1)
2022-04-19 16:21:02 +00:00
Gregory Wlodarek
d53eab0463 SERVER-65655 Skip reinitializing TicketHolders in reinitializeStorageEngine() 2022-04-19 14:27:56 +00:00
Henrik Edin
8c78c8d7f3 SERVER-65499 Fix storing int64 max as int128 in BSONColumnBuilder
Correctly detect that this value is out-of-range for storage in Simple8b

(cherry picked from commit 201844bf23)
2022-04-19 14:03:26 +00:00
Jordi Olivares Provencio
a7156578d9 SERVER-65542 Fix compilation error in Windows
(cherry picked from commit fdc5173d73)
2022-04-19 13:17:34 +00:00
Jordi Olivares Provencio
bd89da11e0 SERVER-65542 Fix ticket resize
(cherry picked from commit 1cb9c79cdf)
2022-04-19 13:17:34 +00:00
Irina Yatsenko
496a3233aa SERVER-65686 split sbe_query_stages lib out of sbe_query
(cherry picked from commit 5689f05f30)
2022-04-19 01:27:39 +00:00
Yoonsoo Kim
69796a5d7a SERVER-65707 Remove FCV-gating for $lookup pushdown 2022-04-18 23:32:39 +00:00
Irina Yatsenko
35eccb21e8 SERVER-65265 Track memory for unbounded accumulators in SBE
(cherry picked from commit 668b505cbd)
2022-04-18 22:02:58 +00:00
Cheahuychou Mao
a234a2a763 SERVER-65698 Add uses_transactions tag to all internal transaction tests
(cherry picked from commit 09925a53f8)
2022-04-18 16:12:56 +00:00
Cheahuychou Mao
0b8c3267a6 SERVER-65505 Make the gdb pretty printers for Session/TransactionParticipant work with the latest version of the SessionCatalog
(cherry picked from commit 53eaaa11e4)
2022-04-18 16:12:56 +00:00
Cheahuychou Mao
845602af9c SERVER-62479 Reap sessions for the same retryable write atomically
(cherry picked from commit 87393ce9bc)
2022-04-18 16:12:56 +00:00
Benety Goh
7dec3cd8f8 SERVER-65704 always check array compression in test-only BSONColumn validation hook
(cherry picked from commit 941d7d65f2)
2022-04-18 15:48:24 +00:00
Mikhail Shchatko
b2236e586c SERVER-65718 Fix mypy error
(cherry picked from commit f75812f03d)
2022-04-18 15:22:21 +00:00
Charlie Swanson
17165df907 SERVER-65701 Avoid running expr.js in multiversion suites 2022-04-15 22:43:07 +00:00
Zakhar Kleyman
018d4b205c SERVER-50564 Remove Amazon Linux (v1) packages 2022-04-15 21:42:19 +00:00
Mickey. J Winters
373bf08581 SERVER-65676 prevent ChangeStreamOptions cluster parameter no passthrough tests from running on no journal variant
(cherry-picked from commit 5b627beab7)
2022-04-15 19:06:06 +00:00
Ryan Egesdahl
7bf944e31d SERVER-65037 Move TSAN builder to RHEL 8.0
(cherry picked from commit 8b57a45b80)
2022-04-15 17:29:41 +00:00
Ryan Egesdahl
4591c76bb3 SERVER-65037 Migrate experimental and test config builders to RHEL80
(cherry picked from commit 393a4f9e35)
2022-04-15 17:29:41 +00:00
Cheahuychou Mao
04301e5efb SERVER-65661 InternalTransactionReshardingTest and InternalTransactionChunkMigrationTest don't always cause transactions to abort with prepare as configured
(cherry picked from commit dd0fe8486e)
2022-04-15 14:46:28 +00:00
Cheahuychou Mao
568d1bc2aa SERVER-65642 Disable internal transactions tests that involve restarts on the inMemory variants
(cherry picked from commit 3e14ad707a)
2022-04-15 14:45:18 +00:00
Charlie Swanson
6dd843ec01 SERVER-64480 Enable multiple SEARCH_META usages
Includes cherry-pick of SERVER-65689 to fix the build.
2022-04-15 14:21:38 +00:00
Jon Streets
2fa1a6ae1b SERVER-65685 update filename suffix for 6.0 2022-04-15 13:57:49 +00:00
Pierlauro Sciarelli
2fd48fab86 SERVER-65328 MigrationSourceManager must reject bounds with outdated shard key patterns
(cherry picked from commit 1d3a714051)
2022-04-15 08:17:25 +00:00
Gregory Noma
ad3b2e8eca SERVER-65545 Delegate ClockSourceMock to ServiceContextMongoDTest
(cherry picked from commit 576ea084ea)
2022-04-15 01:50:45 +00:00
David Storch
4221d7b10b SERVER-65681 Tag set_cluster_parameter_replset.js with "requires_persistence"
(cherry picked from commit fb9cf156cf)
2022-04-14 23:31:28 +00:00
Gregory Noma
2029052d6a SERVER-65652 Delegate TickSourceMock to ServiceContextMongoDTest
(cherry picked from commit 61f8ab6757)
2022-04-14 20:51:10 +00:00
Kaloian Manassiev
017d4d5d43 SERVER-65491 Fix broken JS tests that query for shardVersion match
(cherry picked from commit 5d5ee59116)
2022-04-14 15:23:29 +00:00
Mihai Andrei
1a04db6bf5 SERVER-65338 Runtime configurable query knob to disable SBE $lookup and $group
Co-authored-by: Ethan Zhang <ethan.zhang@mongodb.com>
    (cherry picked from commit 58fc2711d0)
2022-04-14 14:31:57 +00:00
Jon Streets
1e00adedd5 SERVER-64841 remove all feature flag variants from sys-perf 2022-04-14 13:46:44 +00:00
Robert Guo
87a5b5494b SERVER-64883 routine changes for branching 2022-04-13 15:26:46 -04:00
Robert Guo
eda485be24 SERVER-64883 add required variants to the release branch 2022-04-13 15:16:54 -04:00
1838 changed files with 97394 additions and 62426 deletions

View File

@ -9,6 +9,10 @@ inherit = false
# D212 - Multi-line docstring summary should start at the first line
# D213 - Multi-line docstring summary should start at the second line
# D301 - Use r""" if any backslashes in a docstring
ignore = D105,D202,D203,D212,D213,D301
# D401 - First line should be in imperative mood
# D407 - Missing dashed underline after section
# D413 - Missing blank line after last section
# D415 - First line should end with a period, question mark, or exclamation point
ignore = D105,D202,D203,D212,D213,D301,D401,D407,D413,D415
# Do not run on buildscripts/tests/
match = ^((?!buildscripts[\\\/]tests[\\\/]).)*$

View File

@ -90,3 +90,4 @@ Welcome to MongoDB!
October 16, 2018, including patch fixes for prior versions, are published
under the [Server Side Public License (SSPL) v1](LICENSE-Community.txt).
See individual files for details.

View File

@ -2,8 +2,8 @@
import atexit
import copy
import datetime
import errno
import functools
import json
import os
import re
@ -31,6 +31,7 @@ import mongo.platform as mongo_platform
import mongo.toolchain as mongo_toolchain
import mongo.generators as mongo_generators
import mongo.install_actions as install_actions
from mongo.build_profiles import BUILD_PROFILES
EnsurePythonVersion(3, 6)
EnsureSConsVersion(3, 1, 1)
@ -105,9 +106,23 @@ SetOption('random', 1)
# using the nargs='const' mechanism.
#
add_option('ninja',
add_option(
'build-profile',
choices=list(BUILD_PROFILES.keys()),
default='default',
type='choice',
help='''Short hand for common build options. These profiles are well supported by SDP and are
kept up to date. Unless you need something specific, it is recommended that you only build with
these. san is the recommeneded profile since it exposes bugs before they are found in patch
builds. Check out site_scons/mongo/build_profiles.py to see each profile.''',
)
build_profile = BUILD_PROFILES[get_option('build-profile')]
add_option(
'ninja',
choices=['enabled', 'disabled'],
default='disabled',
default=build_profile.ninja,
nargs='?',
const='enabled',
type='choice',
@ -152,8 +167,9 @@ add_option('install-mode',
add_option('install-action',
choices=([*install_actions.available_actions] + ['default']),
default='default',
help='select mechanism to use to install files (advanced option to reduce disk IO and utilization)',
default='hardlink',
help=
'select mechanism to use to install files (advanced option to reduce disk IO and utilization)',
nargs=1,
type='choice',
)
@ -245,7 +261,7 @@ add_option('noshell',
add_option('dbg',
choices=['on', 'off'],
const='on',
default='off',
default=build_profile.dbg,
help='Enable runtime debugging checks',
nargs='?',
type='choice',
@ -270,8 +286,9 @@ add_option('spider-monkey-dbg',
)
add_option('opt',
choices=['on', 'size', 'off'],
choices=['on', 'size', 'off', 'auto'],
const='on',
default=build_profile.opt,
help='Enable compile-time optimization',
nargs='?',
type='choice',
@ -312,6 +329,7 @@ add_option('debug-compress',
add_option('sanitize',
help='enable selected sanitizers',
metavar='san1,san2,...sanN',
default=build_profile.sanitize,
)
add_option('sanitize-coverage',
@ -321,7 +339,7 @@ add_option('sanitize-coverage',
add_option('allocator',
choices=["auto", "system", "tcmalloc", "tcmalloc-experimental"],
default="auto",
default=build_profile.allocator,
help='allocator to use (use "auto" for best choice for current platform)',
type='choice',
)
@ -426,8 +444,9 @@ add_option("disable-warnings-as-errors",
action="append",
choices=["configure", "source"],
const="source",
default=[],
help="Don't add a warnings-as-errors flag to compiler command lines in selected contexts; defaults to 'source' if no argument is provided",
default=build_profile.disable_warnings_as_errors,
help=
"Don't add a warnings-as-errors flag to compiler command lines in selected contexts; defaults to 'source' if no argument is provided",
nargs="?",
type="choice",
)
@ -494,8 +513,9 @@ def find_mongo_custom_variables():
files.append(probe)
return files
add_option('variables-files',
default=[],
add_option(
'variables-files',
default=build_profile.variables_files,
action="append",
help="Specify variables files to load.",
)
@ -503,7 +523,7 @@ add_option('variables-files',
link_model_choices = ['auto', 'object', 'static', 'dynamic', 'dynamic-strict', 'dynamic-sdk']
add_option('link-model',
choices=link_model_choices,
default='auto',
default=build_profile.link_model,
help='Select the linking model for the project',
type='choice'
)
@ -777,8 +797,11 @@ env_vars.Add('ARFLAGS',
help='Sets flags for the archiver',
converter=variable_shlex_converter)
env_vars.Add('CCACHE',
help='Tells SCons where the ccache binary is')
env_vars.Add(
'CCACHE',
help='Tells SCons where the ccache binary is',
default=build_profile.CCACHE,
)
env_vars.Add(
'CACHE_SIZE',
@ -825,16 +848,11 @@ env_vars.Add('CXXFLAGS',
help='Sets flags for the C++ compiler',
converter=variable_shlex_converter)
default_destdir = '$BUILD_ROOT/install'
if get_option('ninja') != 'disabled':
# Workaround for SERVER-53952 where issues wih different
# ninja files building to the same install dir. Different
# ninja files need to build to different install dirs.
default_destdir = '$BUILD_DIR/install'
env_vars.Add('DESTDIR',
env_vars.Add(
'DESTDIR',
help='Where builds will install files',
default=default_destdir)
default='$BUILD_ROOT/install',
)
env_vars.Add('DSYMUTIL',
help='Path to the dsymutil utility',
@ -870,8 +888,11 @@ env_vars.Add('HOST_ARCH',
converter=variable_arch_converter,
default=None)
env_vars.Add('ICECC',
help='Tells SCons where icecream icecc tool is')
env_vars.Add(
'ICECC',
help='Tells SCons where icecream icecc tool is',
default=build_profile.ICECC,
)
env_vars.Add('ICERUN',
help='Tells SCons where icecream icerun tool is')
@ -962,8 +983,14 @@ env_vars.Add('MSVC_VERSION',
help='Sets the version of Visual C++ to use (e.g. 14.2 for VS2019, 14.3 for VS2022)',
default="14.3")
env_vars.Add('NINJA_PREFIX',
default="build",
env_vars.Add('NINJA_BUILDDIR',
help="Location for shared Ninja state",
default="$BUILD_ROOT/ninja",
)
env_vars.Add(
'NINJA_PREFIX',
default=build_profile.NINJA_PREFIX,
help="""A prefix to add to the beginning of generated ninja
files. Useful for when compiling multiple build ninja files for
different configurations, for instance:
@ -976,7 +1003,7 @@ Will generate the files (respectively):
asan.ninja
tsan.ninja
Defaults to build. Best used with the generate-ninja alias so you don't have to
Defaults to build. Best used with the --ninja flag so you don't have to
reiterate the prefix in the target name and variable.
""")
@ -1067,7 +1094,7 @@ env_vars.Add('TOOLS',
env_vars.Add('VARIANT_DIR',
help='Sets the name (or generator function) for the variant directory',
default=mongo_generators.default_variant_dir_generator,
default=build_profile.VARIANT_DIR,
)
env_vars.Add('VERBOSE',
@ -1156,6 +1183,8 @@ dbg_opt_mapping = {
( "off", "off" ) : ( False, False ),
( "on", "size" ) : ( True, True ),
( "off", "size" ) : ( False, True ),
( "on", "auto" ) : ( True, False ),
( "off", "auto" ) : ( False, True ),
}
debugBuild, optBuild = dbg_opt_mapping[(get_option('dbg'), get_option('opt'))]
optBuildForSize = True if optBuild and get_option('opt') == "size" else False
@ -1207,7 +1236,6 @@ envDict = dict(BUILD_ROOT=buildDir,
LIBDEPS_TAG_EXPANSIONS=[],
)
# By default, we will get the normal SCons tool search. But if the
# user has opted into the next gen tools, add our experimental tool
# directory into the default toolpath, ahead of whatever is already in
@ -1319,8 +1347,6 @@ unknown_vars = env_vars.UnknownVariables()
if unknown_vars:
env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
if get_option('install-action') != 'default' and get_option('ninja') != "disabled":
env.FatalError("Cannot use non-default install actions when generating Ninja.")
install_actions.setup(env, get_option('install-action'))
def set_config_header_define(env, varname, varval = 1):
@ -2089,6 +2115,15 @@ for suboption in get_option('experimental-runtime-hardening'):
elif suboption.startswith('+'):
selected_experimental_runtime_hardenings.add(suboption[1:])
# Disable floating-point contractions such as forming of fused multiply-add operations.
if env.ToolchainIs('clang', 'gcc'):
env.Append(CCFLAGS=["-ffp-contract=off"])
else:
# msvc defaults to /fp:precise. Visual Studio 2022 does not emit floating-point contractions
# with /fp:precise, but previous versions can. Disable contractions altogether by using
# /fp:strict.
env.Append(CCFLAGS=["/fp:strict"])
if env.TargetOSIs('linux'):
env.Append( LIBS=["m"] )
if not env.TargetOSIs('android'):
@ -2619,13 +2654,25 @@ if get_option("system-boost-lib-search-suffixes") is not None:
# discover modules, and load the (python) module for each module's build.py
mongo_modules = moduleconfig.discover_modules('src/mongo/db/modules', get_option('modules'))
if get_option('ninja') != 'disabled':
for module in mongo_modules:
if hasattr(module, 'NinjaFile'):
env.FatalError(textwrap.dedent("""\
ERROR: Ninja tool option '--ninja' should not be used with the ninja module.
Remove the ninja module directory or use '--modules= ' to select no modules.
If using enterprise module, explicitly set '--modules=<name-of-enterprise-module>' to exclude the ninja module."""))
has_ninja_module = False
for module in mongo_modules:
if hasattr(module, 'NinjaFile'):
has_ninja_module = True
break
if get_option('ninja') != 'disabled' and has_ninja_module:
env.FatalError(
textwrap.dedent("""\
ERROR: Ninja tool option '--ninja' should not be used with the ninja module.
Using both options simultaneously may clobber build.ninja files.
Remove the ninja module directory or use '--modules= ' to select no modules.
If using enterprise module, explicitly set '--modules=<name-of-enterprise-module>' to exclude the ninja module."""
))
if has_ninja_module:
print(
"WARNING: You are attempting to use the unsupported/legacy ninja module, instead of the integrated ninja generator. You are strongly encouraged to remove the ninja module from your module list and invoke scons with --ninja generate-ninja"
)
# --- check system ---
ssl_provider = None
@ -2821,7 +2868,7 @@ def doConfigure(myenv):
conf.Finish()
def AddFlagIfSupported(env, tool, extension, flag, link, **mutation):
def CheckFlag(env, flag, tool, extension, link, **mutation):
def CheckFlagTest(context, tool, extension, flag):
if link:
if tool == 'C':
@ -2893,24 +2940,33 @@ def doConfigure(myenv):
})
available = conf.CheckFlag()
conf.Finish()
return available
def AddFlagIfSupported(env, flag, tool, extension, link, **mutation):
available = CheckFlag(env, flag, tool, extension, link, **mutation)
if available:
env.Append(**mutation)
return available
def AddToCFLAGSIfSupported(env, flag):
return AddFlagIfSupported(env, 'C', '.c', flag, False, CFLAGS=[flag])
conf_check_vars = {
'CFLAGS': {'tool': 'C', 'extension': '.c', 'link': False},
'CCFLAGS': {'tool': 'C', 'extension': '.c', 'link': False},
'CXXFLAGS': {'tool': 'C++', 'extension': '.cpp', 'link': False},
'LINKFLAGS': {'tool': 'C', 'extension': '.c', 'link': True},
'SHLINKFLAGS': {'tool': 'C', 'extension': '.c', 'link': True},
}
def AddToCCFLAGSIfSupported(env, flag):
return AddFlagIfSupported(env, 'C', '.c', flag, False, CCFLAGS=[flag])
def var_func(env, flag, var, func):
kwargs = dict({var: [flag]}, **conf_check_vars[var])
return func(env, flag, **kwargs)
def AddToCXXFLAGSIfSupported(env, flag):
return AddFlagIfSupported(env, 'C++', '.cpp', flag, False, CXXFLAGS=[flag])
def AddToLINKFLAGSIfSupported(env, flag):
return AddFlagIfSupported(env, 'C', '.c', flag, True, LINKFLAGS=[flag])
def AddToSHLINKFLAGSIfSupported(env, flag):
return AddFlagIfSupported(env, 'C', '.c', flag, True, SHLINKFLAGS=[flag])
for var in conf_check_vars:
myenv.AddMethod(
functools.partial(var_func, var=var, func=AddFlagIfSupported), f"AddTo{var}IfSupported")
myenv.AddMethod(
functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported")
if myenv.ToolchainIs('gcc', 'clang'):
# This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker
@ -2933,20 +2989,20 @@ def doConfigure(myenv):
#
# We should revisit all of these issues the next time we upgrade our clang minimum.
if get_option('separate-debug') == 'off' and get_option('link-model') != 'dynamic':
if not AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=lld'):
AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold')
if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
myenv.AddToLINKFLAGSIfSupported('-fuse-ld=gold')
else:
AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold')
myenv.AddToLINKFLAGSIfSupported('-fuse-ld=gold')
elif link_model.startswith("dynamic") and linker_ld == 'bfd':
# BFD is not supported due to issues with it causing warnings from some of
# the third party libraries that mongodb is linked with:
# https://jira.mongodb.org/browse/SERVER-49465
myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.")
else:
if not AddToLINKFLAGSIfSupported(myenv, f'-fuse-ld={linker_ld}'):
if not myenv.AddToLINKFLAGSIfSupported(f'-fuse-ld={linker_ld}'):
myenv.FatalError(f"Linker {linker_ld} could not be configured.")
if has_option('gcov') and AddToCCFLAGSIfSupported(myenv, '-fprofile-update=single'):
if has_option('gcov') and myenv.AddToCCFLAGSIfSupported('-fprofile-update=single'):
myenv.AppendUnique(LINKFLAGS=['-fprofile-update=single'])
detectCompiler = Configure(myenv, help=False, custom_tests = {
@ -2973,11 +3029,11 @@ def doConfigure(myenv):
if myenv.ToolchainIs('clang', 'gcc'):
# This warning was added in g++-4.8.
AddToCCFLAGSIfSupported(myenv, '-Wno-unused-local-typedefs')
myenv.AddToCCFLAGSIfSupported('-Wno-unused-local-typedefs')
# Clang likes to warn about unused functions, which seems a tad aggressive and breaks
# -Werror, which we want to be able to use.
AddToCCFLAGSIfSupported(myenv, '-Wno-unused-function')
myenv.AddToCCFLAGSIfSupported('-Wno-unused-function')
# TODO: Note that the following two flags are added to CCFLAGS even though they are
# really C++ specific. We need to do this because SCons passes CXXFLAGS *before*
@ -2987,79 +3043,79 @@ def doConfigure(myenv):
#
# Clang likes to warn about unused private fields, but some of our third_party
# libraries have such things.
AddToCCFLAGSIfSupported(myenv, '-Wno-unused-private-field')
myenv.AddToCCFLAGSIfSupported('-Wno-unused-private-field')
# Prevents warning about using deprecated features (such as auto_ptr in c++11)
# Using -Wno-error=deprecated-declarations does not seem to work on some compilers,
# including at least g++-4.6.
AddToCCFLAGSIfSupported(myenv, "-Wno-deprecated-declarations")
myenv.AddToCCFLAGSIfSupported("-Wno-deprecated-declarations")
# As of clang-3.4, this warning appears in v8, and gets escalated to an error.
AddToCCFLAGSIfSupported(myenv, "-Wno-tautological-constant-out-of-range-compare")
myenv.AddToCCFLAGSIfSupported("-Wno-tautological-constant-out-of-range-compare")
# As of clang in Android NDK 17, these warnings appears in boost and/or ICU, and get escalated to errors
AddToCCFLAGSIfSupported(myenv, "-Wno-tautological-constant-compare")
AddToCCFLAGSIfSupported(myenv, "-Wno-tautological-unsigned-zero-compare")
AddToCCFLAGSIfSupported(myenv, "-Wno-tautological-unsigned-enum-zero-compare")
myenv.AddToCCFLAGSIfSupported("-Wno-tautological-constant-compare")
myenv.AddToCCFLAGSIfSupported("-Wno-tautological-unsigned-zero-compare")
myenv.AddToCCFLAGSIfSupported("-Wno-tautological-unsigned-enum-zero-compare")
# New in clang-3.4, trips up things mostly in third_party, but in a few places in the
# primary mongo sources as well.
AddToCCFLAGSIfSupported(myenv, "-Wno-unused-const-variable")
myenv.AddToCCFLAGSIfSupported("-Wno-unused-const-variable")
# Prevents warning about unused but set variables found in boost version 1.49
# in boost/date_time/format_date_parser.hpp which does not work for compilers
# GCC >= 4.6. Error explained in https://svn.boost.org/trac/boost/ticket/6136 .
AddToCCFLAGSIfSupported(myenv, "-Wno-unused-but-set-variable")
myenv.AddToCCFLAGSIfSupported("-Wno-unused-but-set-variable")
# This has been suppressed in gcc 4.8, due to false positives, but not in clang. So
# we explicitly disable it here.
AddToCCFLAGSIfSupported(myenv, "-Wno-missing-braces")
myenv.AddToCCFLAGSIfSupported("-Wno-missing-braces")
# Suppress warnings about not consistently using override everywhere in a class. It seems
# very pedantic, and we have a fair number of instances.
AddToCCFLAGSIfSupported(myenv, "-Wno-inconsistent-missing-override")
myenv.AddToCCFLAGSIfSupported("-Wno-inconsistent-missing-override")
# Don't issue warnings about potentially evaluated expressions
AddToCCFLAGSIfSupported(myenv, "-Wno-potentially-evaluated-expression")
myenv.AddToCCFLAGSIfSupported("-Wno-potentially-evaluated-expression")
# Warn about moves of prvalues, which can inhibit copy elision.
AddToCXXFLAGSIfSupported(myenv, "-Wpessimizing-move")
myenv.AddToCXXFLAGSIfSupported("-Wpessimizing-move")
# Disable warning about variables that may not be initialized
# Failures are triggered in the case of boost::optional in GCC 4.8.x
# TODO: re-evaluate when we move to GCC 5.3
# see: http://stackoverflow.com/questions/21755206/how-to-get-around-gcc-void-b-4-may-be-used-uninitialized-in-this-funct
AddToCXXFLAGSIfSupported(myenv, "-Wno-maybe-uninitialized")
myenv.AddToCXXFLAGSIfSupported("-Wno-maybe-uninitialized")
# Disable warning about templates that can't be implicitly instantiated. It is an attempt to
# make a link error into an easier-to-debug compiler failure, but it triggers false
# positives if explicit instantiation is used in a TU that can see the full definition. This
# is a problem at least for the S2 headers.
AddToCXXFLAGSIfSupported(myenv, "-Wno-undefined-var-template")
myenv.AddToCXXFLAGSIfSupported("-Wno-undefined-var-template")
# This warning was added in clang-4.0, but it warns about code that is required on some
# platforms. Since the warning just states that 'explicit instantiation of [a template] that
# occurs after an explicit specialization has no effect', it is harmless on platforms where
# it isn't required
AddToCXXFLAGSIfSupported(myenv, "-Wno-instantiation-after-specialization")
myenv.AddToCXXFLAGSIfSupported("-Wno-instantiation-after-specialization")
# This warning was added in clang-5 and flags many of our lambdas. Since it isn't actively
# harmful to capture unused variables we are suppressing for now with a plan to fix later.
AddToCCFLAGSIfSupported(myenv, "-Wno-unused-lambda-capture")
myenv.AddToCCFLAGSIfSupported("-Wno-unused-lambda-capture")
# Enable sized deallocation support.
AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation')
myenv.AddToCXXFLAGSIfSupported('-fsized-deallocation')
# This warning was added in Apple clang version 11 and flags many explicitly defaulted move
# constructors and assignment operators for being implicitly deleted, which is not useful.
AddToCXXFLAGSIfSupported(myenv, "-Wno-defaulted-function-deleted")
myenv.AddToCXXFLAGSIfSupported("-Wno-defaulted-function-deleted")
# SERVER-44856: Our windows builds complain about unused
# exception parameters, but GCC and clang don't seem to do
# that for us automatically. In the interest of making it more
# likely to catch these errors early, add the (currently clang
# only) flag that turns it on.
AddToCXXFLAGSIfSupported(myenv, "-Wunused-exception-parameter")
myenv.AddToCXXFLAGSIfSupported("-Wunused-exception-parameter")
# TODO(SERVER-60151): Avoid the dilemma identified in
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100493. Unfortunately,
@ -3071,7 +3127,7 @@ def doConfigure(myenv):
# TODO(SERVER-60175): In fact we will want to explicitly opt
# in to -Wdeprecated, since clang doesn't include it in -Wall.
if get_option('cxx-std') == "20":
AddToCXXFLAGSIfSupported(myenv, '-Wno-deprecated')
myenv.AddToCXXFLAGSIfSupported('-Wno-deprecated')
# Check if we can set "-Wnon-virtual-dtor" when "-Werror" is set. The only time we can't set it is on
# clang 3.4, where a class with virtual function(s) and a non-virtual destructor throws a warning when
@ -3115,25 +3171,21 @@ def doConfigure(myenv):
# by -Wall), in order to enforce that -mXXX-version-min=YYY
# will enforce that you don't use APIs from ZZZ.
if env.TargetOSIs('darwin'):
AddToCCFLAGSIfSupported(env, '-Wunguarded-availability')
env.AddToCCFLAGSIfSupported('-Wunguarded-availability')
if get_option('runtime-hardening') == "on":
# Enable 'strong' stack protection preferentially, but fall back to 'all' if it is not
# available. Note that we need to add these to the LINKFLAGS as well, since otherwise we
# might not link libssp when we need to (see SERVER-12456).
if myenv.ToolchainIs('gcc', 'clang'):
if AddToCCFLAGSIfSupported(myenv, '-fstack-protector-strong'):
myenv.Append(
LINKFLAGS=[
'-fstack-protector-strong',
]
)
elif AddToCCFLAGSIfSupported(myenv, '-fstack-protector-all'):
myenv.Append(
LINKFLAGS=[
'-fstack-protector-all',
]
)
if myenv.AddToCCFLAGSIfSupported('-fstack-protector-strong'):
myenv.Append(LINKFLAGS=[
'-fstack-protector-strong',
], )
elif myenv.AddToCCFLAGSIfSupported('-fstack-protector-all'):
myenv.Append(LINKFLAGS=[
'-fstack-protector-all',
], )
if 'cfex' in selected_experimental_runtime_hardenings:
myenv.Append(
@ -3141,10 +3193,10 @@ def doConfigure(myenv):
)
if 'stackclash' in selected_experimental_runtime_hardenings:
AddToCCFLAGSIfSupported(myenv, "-fstack-clash-protection")
myenv.AddToCCFLAGSIfSupported("-fstack-clash-protection")
if 'controlflow' in selected_experimental_runtime_hardenings:
AddToCCFLAGSIfSupported(myenv, "-fcf-protection=full")
myenv.AddToCCFLAGSIfSupported("-fcf-protection=full")
if myenv.ToolchainIs('clang'):
# TODO: There are several interesting things to try here, but they each have
@ -3187,7 +3239,7 @@ def doConfigure(myenv):
if has_option('libc++'):
if not myenv.ToolchainIs('clang'):
myenv.FatalError('libc++ is currently only supported for clang')
if AddToCXXFLAGSIfSupported(myenv, '-stdlib=libc++'):
if myenv.AddToCXXFLAGSIfSupported('-stdlib=libc++'):
myenv.Append(LINKFLAGS=['-stdlib=libc++'])
else:
myenv.ConfError('libc++ requested, but compiler does not support -stdlib=libc++' )
@ -3218,14 +3270,13 @@ def doConfigure(myenv):
myenv.AppendUnique(CCFLAGS=['/std:c++20'])
else:
if get_option('cxx-std') == "17":
if not AddToCXXFLAGSIfSupported(myenv, '-std=c++17'):
if not myenv.AddToCXXFLAGSIfSupported('-std=c++17'):
myenv.ConfError('Compiler does not honor -std=c++17')
elif get_option('cxx-std') == "20":
if not AddToCXXFLAGSIfSupported(myenv, '-std=c++20'):
if not myenv.AddToCXXFLAGSIfSupported('-std=c++20'):
myenv.ConfError('Compiler does not honor -std=c++20')
if not AddToCFLAGSIfSupported(myenv, '-std=c11'):
if not myenv.AddToCFLAGSIfSupported('-std=c11'):
myenv.ConfError("C++17 mode selected for C++ files, but can't enable C11 for C files")
if using_system_version_of_cxx_libraries():
@ -3498,7 +3549,7 @@ def doConfigure(myenv):
sanitizer_option = '-fsanitize=' + ','.join(sanitizer_list)
if AddToCCFLAGSIfSupported(myenv, sanitizer_option):
if myenv.AddToCCFLAGSIfSupported(sanitizer_option):
myenv.Append(LINKFLAGS=[sanitizer_option])
myenv.Append(CCFLAGS=['-fno-omit-frame-pointer'])
else:
@ -3509,7 +3560,7 @@ def doConfigure(myenv):
if has_option('sanitize-coverage') and using_fsan:
sanitize_coverage_list = get_option('sanitize-coverage')
sanitize_coverage_option = '-fsanitize-coverage=' + sanitize_coverage_list
if AddToCCFLAGSIfSupported(myenv,sanitize_coverage_option):
if myenv.AddToCCFLAGSIfSupported(sanitize_coverage_option):
myenv.Append(LINKFLAGS=[sanitize_coverage_option])
else:
myenv.ConfError('Failed to enable -fsanitize-coverage with flag: {0}', sanitize_coverage_option )
@ -3531,7 +3582,7 @@ def doConfigure(myenv):
supportedDenyfiles = []
denyfilesTestEnv = myenv.Clone()
for denyfile in denyfiles:
if AddToCCFLAGSIfSupported(denyfilesTestEnv, f"-fsanitize-blacklist={denyfile}"):
if denyfilesTestEnv.AddToCCFLAGSIfSupported(f"-fsanitize-blacklist={denyfile}"):
supportedDenyfiles.append(denyfile)
denyfilesTestEnv = None
supportedDenyfiles = sorted(supportedDenyfiles)
@ -3666,8 +3717,8 @@ def doConfigure(myenv):
# have renamed the flag.
# However, this flag cannot be included when using the fuzzer sanitizer
# if we want to suppress errors to uncover new ones.
if not using_fsan and not AddToCCFLAGSIfSupported(myenv, "-fno-sanitize-recover"):
AddToCCFLAGSIfSupported(myenv, "-fno-sanitize-recover=undefined")
if not using_fsan and not myenv.AddToCCFLAGSIfSupported("-fno-sanitize-recover"):
myenv.AddToCCFLAGSIfSupported("-fno-sanitize-recover=undefined")
myenv.AppendUnique(CPPDEFINES=['UNDEFINED_BEHAVIOR_SANITIZER'])
# If anything is changed, added, or removed in ubsan_options, be
@ -3689,7 +3740,7 @@ def doConfigure(myenv):
# same as the correct link graph for a regular dynamic
# build.
if link_model == "dynamic":
if AddToCCFLAGSIfSupported(myenv, "-fno-sanitize=vptr"):
if myenv.AddToCCFLAGSIfSupported("-fno-sanitize=vptr"):
myenv.AppendUnique(LINKFLAGS=["-fno-sanitize=vptr"])
if myenv.ToolchainIs('msvc') and optBuild:
@ -3708,21 +3759,28 @@ def doConfigure(myenv):
# Usually, --gdb-index is too expensive in big static binaries, but for dynamic
# builds it works well.
if link_model.startswith("dynamic"):
AddToLINKFLAGSIfSupported(myenv, '-Wl,--gdb-index')
myenv.AddToLINKFLAGSIfSupported('-Wl,--gdb-index')
if link_model != 'dynamic':
# This will create an extra section where debug types can be referred from,
# reducing other section sizes. This helps most with big static links as there
# will be lots of duplicate debug type info.
myenv.AddToCCFLAGSIfSupported('-fdebug-types-section')
myenv.AddToLINKFLAGSIfSupported('-fdebug-types-section')
# Our build is already parallel.
AddToLINKFLAGSIfSupported(myenv, '-Wl,--no-threads')
myenv.AddToLINKFLAGSIfSupported('-Wl,--no-threads')
# Explicitly enable GNU build id's if the linker supports it.
AddToLINKFLAGSIfSupported(myenv, '-Wl,--build-id')
myenv.AddToLINKFLAGSIfSupported('-Wl,--build-id')
# Explicitly use the new gnu hash section if the linker offers
# it, except on android since older runtimes seem to not
# support it. For that platform, use 'both'.
if env.TargetOSIs('android'):
AddToLINKFLAGSIfSupported(myenv, '-Wl,--hash-style=both')
myenv.AddToLINKFLAGSIfSupported('-Wl,--hash-style=both')
else:
AddToLINKFLAGSIfSupported(myenv, '-Wl,--hash-style=gnu')
myenv.AddToLINKFLAGSIfSupported('-Wl,--hash-style=gnu')
# Try to have the linker tell us about ODR violations. Don't
# use it when using clang with libstdc++, as libstdc++ was
@ -3734,17 +3792,17 @@ def doConfigure(myenv):
env.FatalError('The --detect-odr-violations flag does not work with clang and libstdc++')
if optBuild:
env.FatalError('The --detect-odr-violations flag is expected to only be reliable with --opt=off')
AddToLINKFLAGSIfSupported(myenv, '-Wl,--detect-odr-violations')
myenv.AddToLINKFLAGSIfSupported('-Wl,--detect-odr-violations')
# Disallow an executable stack. Also, issue a warning if any files are found that would
# cause the stack to become executable if the noexecstack flag was not in play, so that we
# can find them and fix them. We do this here after we check for ld.gold because the
# --warn-execstack is currently only offered with gold.
AddToLINKFLAGSIfSupported(myenv, "-Wl,-z,noexecstack")
AddToLINKFLAGSIfSupported(myenv, "-Wl,--warn-execstack")
myenv.AddToLINKFLAGSIfSupported("-Wl,-z,noexecstack")
myenv.AddToLINKFLAGSIfSupported("-Wl,--warn-execstack")
# If possible with the current linker, mark relocations as read-only.
AddToLINKFLAGSIfSupported(myenv, "-Wl,-z,relro")
myenv.AddToLINKFLAGSIfSupported("-Wl,-z,relro")
# As far as we know these flags only apply on posix-y systems,
# and not on Darwin.
@ -3777,9 +3835,9 @@ def doConfigure(myenv):
compress_type="zlib-gabi"
compress_flag="compress-debug-sections"
AddToCCFLAGSIfSupported(
myenv,
f"-Wa,--{compress_flag}={compress_type}" if "as" in debug_compress else f"-Wa,--no{compress_flag}")
myenv.AddToCCFLAGSIfSupported(
f"-Wa,--{compress_flag}={compress_type}"
if "as" in debug_compress else f"-Wa,--no{compress_flag}", )
# We shouldn't enable debug compression in the linker
# (meaning our final binaries contain compressed debug
@ -3811,20 +3869,16 @@ def doConfigure(myenv):
conf.Finish()
if have_shf_compressed and 'ld' in debug_compress:
AddToLINKFLAGSIfSupported(
myenv,
f"-Wl,--{compress_flag}={compress_type}")
myenv.AddToLINKFLAGSIfSupported(f"-Wl,--{compress_flag}={compress_type}", )
else:
AddToLINKFLAGSIfSupported(
myenv,
f"-Wl,--{compress_flag}=none")
myenv.AddToLINKFLAGSIfSupported(f"-Wl,--{compress_flag}=none", )
if "fnsi" in selected_experimental_optimizations:
AddToCCFLAGSIfSupported(myenv, "-fno-semantic-interposition")
myenv.AddToCCFLAGSIfSupported("-fno-semantic-interposition")
# Avoid deduping symbols on OS X debug builds, as it takes a long time.
if not optBuild and myenv.ToolchainIs('clang') and env.TargetOSIs('darwin'):
AddToLINKFLAGSIfSupported(myenv, "-Wl,-no_deduplicate")
myenv.AddToLINKFLAGSIfSupported("-Wl,-no_deduplicate")
# Apply any link time optimization settings as selected by the 'lto' option.
if has_option('lto'):
@ -3841,13 +3895,13 @@ def doConfigure(myenv):
elif myenv.ToolchainIs('gcc', 'clang'):
# For GCC and clang, the flag is -flto, and we need to pass it both on the compile
# and link lines.
if not AddToCCFLAGSIfSupported(myenv, '-flto') or \
not AddToLINKFLAGSIfSupported(myenv, '-flto'):
if not myenv.AddToCCFLAGSIfSupported('-flto') or \
not myenv.AddToLINKFLAGSIfSupported('-flto'):
myenv.ConfError("Link time optimization requested, "
"but selected compiler does not honor -flto" )
if myenv.TargetOSIs('darwin'):
AddToLINKFLAGSIfSupported(myenv, '-Wl,-object_path_lto,${TARGET}.lto')
myenv.AddToLINKFLAGSIfSupported('-Wl,-object_path_lto,${TARGET}.lto')
else:
myenv.ConfError("Don't know how to enable --lto on current toolchain")
@ -3889,11 +3943,76 @@ def doConfigure(myenv):
myenv = conf.Finish()
# Our build generally assumes that we have C11-compliant libc headers for
# C++ source. On most systems, that will be the case. However, on systems
# using glibc older than 2.18 (or other libc implementations that have
# stubbornly refused to update), we need to add some preprocessor defines.
#
# See: https://sourceware.org/bugzilla/show_bug.cgi?id=15366
#
# These headers are only fully standards-compliant on POSIX platforms. Windows
# in particular doesn't implement inttypes.h
if env.TargetOSIs('posix'):
def NeedStdCLimitMacros(context):
test_body="""
#undef __STDC_LIMIT_MACROS
#include <stdint.h>
#if defined(INT64_MAX)
# error
#endif
"""
context.Message('Checking whether to define __STDC_LIMIT_MACROS... ')
ret = context.TryCompile(textwrap.dedent(test_body), '.cpp')
context.Result(ret)
return ret
def NeedStdCConstantMacros(context):
test_body="""
#undef __STDC_CONSTANT_MACROS
#include <stdint.h>
#if defined(INTMAX_C)
# error
#endif
"""
context.Message('Checking whether to define __STDC_CONSTANT_MACROS... ')
ret = context.TryCompile(textwrap.dedent(test_body), '.cpp')
context.Result(ret)
return ret
def NeedStdCFormatMacros(context):
test_body="""
#undef __STDC_FORMAT_MACROS
#include <inttypes.h>
#if defined(PRIx64)
# error
#endif
"""
context.Message('Checking whether to define __STDC_FORMAT_MACROS... ')
ret = context.TryCompile(textwrap.dedent(test_body), '.cpp')
context.Result(ret)
return ret
conf = Configure(myenv, help=False, custom_tests = {
'NeedStdCLimitMacros': NeedStdCLimitMacros,
'NeedStdCConstantMacros': NeedStdCConstantMacros,
'NeedStdCFormatMacros': NeedStdCFormatMacros,
})
conf.env.AppendUnique(
CPPDEFINES=[
'__STDC_LIMIT_MACROS' if conf.NeedStdCLimitMacros() else '',
'__STDC_CONSTANT_MACROS' if conf.NeedStdCConstantMacros() else '',
'__STDC_FORMAT_MACROS' if conf.NeedStdCFormatMacros() else '',
]
)
myenv = conf.Finish()
# We set this with GCC on x86 platforms to work around
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
if myenv.ToolchainIs('gcc') and (env['TARGET_ARCH'] in ['i386', 'x86_64']):
if not 'builtin-memcmp' in selected_experimental_optimizations:
AddToCCFLAGSIfSupported(myenv, '-fno-builtin-memcmp')
myenv.AddToCCFLAGSIfSupported('-fno-builtin-memcmp')
# pthread_setname_np was added in GLIBC 2.12, and Solaris 11.3
if posix_system:
@ -4522,7 +4641,7 @@ def doConfigure(myenv):
myenv = conf.Finish()
if env['TARGET_ARCH'] == "aarch64":
AddToCCFLAGSIfSupported(myenv, "-moutline-atomics")
myenv.AddToCCFLAGSIfSupported("-moutline-atomics")
conf = Configure(myenv)
usdt_enabled = get_option('enable-usdt-probes')
@ -4647,7 +4766,7 @@ if get_option('ninja') != 'disabled':
env.FatalError("Use of ccache is mandatory with --ninja and icecream older than 1.2. You are running {}.".format(env['ICECREAM_VERSION']))
ninja_builder = Tool("ninja")
env["NINJA_BUILDDIR"] = env.Dir("$BUILD_DIR/ninja")
env["NINJA_BUILDDIR"] = env.Dir("$NINJA_BUILDDIR")
ninja_builder.generate(env)
ninjaConf = Configure(env, help=False, custom_tests = {
@ -4673,6 +4792,54 @@ if get_option('ninja') != 'disabled':
env['NINJA_REGENERATE_DEPS'] = ninja_generate_deps
if env.TargetOSIs('windows'):
# The /b option here will make sure that windows updates the mtime
# when copying the file. This allows to not need to use restat for windows
# copy commands.
copy_install_cmd = "cmd.exe /c copy /b $in $out 1>NUL"
else:
copy_install_cmd = "install $in $out"
if env.GetOption('install-action') == 'hardlink':
if env.TargetOSIs('windows'):
install_cmd = f"cmd.exe /c mklink /h $out $in 1>nul || {copy_install_cmd}"
else:
install_cmd = f"ln $in $out || {copy_install_cmd}"
elif env.GetOption('install-action') == 'symlink':
# macOS's ln and Windows mklink command do not support relpaths
# out of the box so we will precompute during generation in a
# custom handler.
def symlink_install_action_function(_env, node):
# should only be one output and input for this case
output_file = _env.NinjaGetOutputs(node)[0]
input_file = _env.NinjaGetDependencies(node)[0]
try:
relpath = os.path.relpath(input_file, os.path.dirname(output_file))
except ValueError:
relpath = os.path.abspath(input_file)
return {
"outputs": [output_file],
"rule": "INSTALL",
"inputs": [input_file],
"implicit": _env.NinjaGetDependencies(node),
"variables": {"precious": node.precious, "relpath": relpath},
}
env.NinjaRegisterFunctionHandler("installFunc", symlink_install_action_function)
if env.TargetOSIs('windows'):
install_cmd = "cmd.exe /c mklink $out $relpath 1>nul"
else:
install_cmd = "ln -s $relpath $out"
else:
install_cmd = copy_install_cmd
env.NinjaRule("INSTALL", install_cmd, description="Installed $out", pool="install_pool")
if env.TargetOSIs("windows"):
# This is a workaround on windows for SERVER-48691 where the line length
# in response files is too long:
@ -4951,15 +5118,15 @@ env.AddPackageNameAlias(
)
env.AddPackageNameAlias(
component="shell",
component="jstestshell",
role="runtime",
name="mongodb-shell",
name="mongodb-jstestshell",
)
env.AddPackageNameAlias(
component="shell",
component="jstestshell",
role="debug",
name="mongodb-shell-debugsymbols",
name="mongodb-jstestshell-debugsymbols",
)
env.AddPackageNameAlias(
@ -4992,7 +5159,10 @@ env.AddPackageNameAlias(
name="mh-debugsymbols",
)
def rpath_generator(env, source, target, for_signature):
env['RPATH_ESCAPED_DOLLAR_ORIGIN'] = '\\$$$$ORIGIN'
def prefix_libdir_rpath_generator(env, source, target, for_signature):
# If the PREFIX_LIBDIR has an absolute path, we will use that directly as
# RPATH because that indicates the final install destination of the libraries.
prefix_libdir = env.subst('$PREFIX_LIBDIR')
@ -5004,16 +5174,18 @@ def rpath_generator(env, source, target, for_signature):
lib_rel = os.path.relpath(prefix_libdir, env.subst('$PREFIX_BINDIR'))
if env['PLATFORM'] == 'posix':\
return [env.Literal(f"\\$$ORIGIN/{lib_rel}")]
return f"$RPATH_ESCAPED_DOLLAR_ORIGIN/{lib_rel}"
if env['PLATFORM'] == 'darwin':
return [f"@loader_path/{lib_rel}",]
return f"@loader_path/{lib_rel}"
env['RPATH_GENERATOR'] = rpath_generator
if get_option('link-model').startswith('dynamic'):
env['PREFIX_LIBDIR_RPATH_GENERATOR'] = prefix_libdir_rpath_generator
if env['PLATFORM'] == 'posix':
env.AppendUnique(
RPATH='$RPATH_GENERATOR',
RPATH=['$PREFIX_LIBDIR_RPATH_GENERATOR'],
LINKFLAGS=[
# Most systems *require* -z,origin to make origin work, but android
# blows up at runtime if it finds DF_ORIGIN_1 in DT_FLAGS_1.
@ -5034,12 +5206,12 @@ elif env['PLATFORM'] == 'darwin':
# so we setup RPATH and LINKFLAGS ourselves.
env['RPATHPREFIX'] = '-Wl,-rpath,'
env['RPATHSUFFIX'] = ''
env['RPATH'] = '$RPATH_GENERATOR'
env.AppendUnique(
LINKFLAGS="${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}",
SHLINKFLAGS=[
"-Wl,-install_name,@rpath/${TARGET.file}",
],
RPATH=['$PREFIX_LIBDIR_RPATH_GENERATOR'],
)
env.Default(env.Alias("install-default"))

View File

@ -70,7 +70,7 @@ BUILD_LOGGER_APPEND_GLOBAL_LOGS_ENDPOINT = "/build/%(build_id)s"
BUILD_LOGGER_CREATE_TEST_ENDPOINT = "/build/%(build_id)s/test"
BUILD_LOGGER_APPEND_TEST_LOGS_ENDPOINT = "/build/%(build_id)s/test/%(test_id)s"
BUILD_LOGGER_DEFAULT_URL = "https://logkeeper.mongodb.org"
BUILD_LOGGER_DEFAULT_URL = "https://logkeeper2.build.10gen.cc"
BUILD_LOGGER_TIMEOUT_SECS = 65
LOCAL_REPORTS_DIR = "bd_reports"
@ -86,7 +86,7 @@ THIRD_PARTY_COMPONENTS_FILE = "etc/third_party_components.yml"
############################################################################
RE_LETTERS = re.compile("[A-Za-z]{2,}")
RE_LETTER = re.compile("[A-Za-z]")
def default_if_none(value, default):
@ -287,7 +287,9 @@ class VersionInfo:
self.production_version = True
# Abseil has an empty string for one version
if self.ver_str == "":
# Abseil thinks "~" is character to use in versions
# Geary thinks "+" is character to use in versions
if self.ver_str == "" or "~" in self.ver_str or "+" in self.ver_str:
self.production_version = False
return
@ -329,8 +331,9 @@ class VersionInfo:
if self.ver_str.endswith('-'):
self.ver_str = self.ver_str[0:-1]
# Boost keeps varying the version strings so filter for anything with 2 or more ascii charaters
if RE_LETTERS.search(self.ver_str):
# Boost keeps varying the version strings so filter for anything with a letter
# Safeint has "3.0.26c" as a version number
if RE_LETTER.search(self.ver_str):
self.production_version = False
return
@ -570,7 +573,7 @@ curl --retry 5 -s -L https://detect.synopsys.com/detect.sh | bash -s -- --black
""".encode())
fp.flush()
subprocess.call(["/bin/sh", fp.name])
subprocess.check_call(["/bin/sh", fp.name])
def _scan_cmd_args(args):

View File

@ -9,7 +9,7 @@ class PathOptions:
shared_library_folder_name = "lib"
# extend the below list if there are new types of shared libraries
_shared_library_file_patterns = [r".+\.so(\.\d{1,})?$", r".+\.dylib$"]
_shared_library_file_patterns = [r".+\.so(\.(\d{1,}|debug))?$", r".+\.dylib$"]
_compiled_shared_library_file_patterns = None
@property

View File

@ -160,7 +160,7 @@ def _generate_evg_tasks(evergreen_api: EvergreenApi, shrub_project: ShrubProject
repeat_tests_max=config_options.repeat_tests_max,
repeat_tests_secs=config_options.repeat_tests_secs)
burn_in_generator = GenerateBurnInExecutor(gen_config, repeat_config, evergreen_api)
burn_in_generator = GenerateBurnInExecutor(gen_config, repeat_config)
burn_in_generator.generate_tasks_for_variant(tests_by_task, shrub_build_variant)
shrub_project.add_build_variant(shrub_build_variant)

View File

@ -13,6 +13,7 @@ from typing import Optional, Set, Tuple, List, Dict, NamedTuple
import click
import yaml
from git import Repo
from pydantic import BaseModel
import structlog
from structlog.stdlib import LoggerFactory
@ -352,7 +353,8 @@ def create_task_list_for_tests(changed_tests: Set[str], build_variant: str,
def create_tests_by_task(build_variant: str, evg_conf: EvergreenProjectConfig,
changed_tests: Set[str], install_dir: str) -> Dict[str, TaskInfo]:
changed_tests: Set[str],
install_dir: Optional[str]) -> Dict[str, TaskInfo]:
"""
Create a list of tests by task.
@ -367,7 +369,11 @@ def create_tests_by_task(build_variant: str, evg_conf: EvergreenProjectConfig,
exclude_tests.append(f"{ENTERPRISE_MODULE_PATH}/**/*")
changed_tests = filter_tests(changed_tests, exclude_tests)
buildscripts.resmokelib.parser.set_run_options(f"--installDir={shlex.quote(install_dir)}")
run_options = ""
if install_dir is not None:
run_options = f"--installDir={shlex.quote(install_dir)}"
buildscripts.resmokelib.parser.set_run_options(run_options)
if changed_tests:
return create_task_list_for_tests(changed_tests, build_variant, evg_conf, exclude_suites,
exclude_tasks)
@ -408,7 +414,7 @@ def _configure_logging(verbose: bool):
logging.basicConfig(
format="[%(asctime)s - %(name)s - %(levelname)s] %(message)s",
level=level,
stream=sys.stdout,
stream=sys.stderr,
)
for log_name in EXTERNAL_LOGGERS:
logging.getLogger(log_name).setLevel(logging.WARNING)
@ -537,11 +543,45 @@ class LocalBurnInExecutor(BurnInExecutor):
run_tests(tests_by_task, resmoke_cmd)
class DiscoveredTask(BaseModel):
"""
Model for a discovered task to run.
* task_name: Name of discovered task.
* test_list: List of tests to run under discovered task.
"""
task_name: str
test_list: List[str]
class DiscoveredTaskList(BaseModel):
"""Model for a list of discovered tasks."""
discovered_tasks: List[DiscoveredTask]
class YamlBurnInExecutor(BurnInExecutor):
"""A burn-in executor that outputs discovered tasks as YAML."""
def execute(self, tests_by_task: Dict[str, TaskInfo]) -> None:
"""
Report the given tasks and their tests to stdout.
:param tests_by_task: Dictionary of tasks to run with tests to run in each.
"""
discovered_tasks = DiscoveredTaskList(discovered_tasks=[
DiscoveredTask(task_name=task_name, test_list=task_info.tests)
for task_name, task_info in tests_by_task.items()
])
print(yaml.safe_dump(discovered_tasks.dict()))
class BurnInOrchestrator:
"""Orchestrate the execution of burn_in_tests."""
def __init__(self, change_detector: FileChangeDetector, burn_in_executor: BurnInExecutor,
evg_conf: EvergreenProjectConfig) -> None:
evg_conf: EvergreenProjectConfig, install_dir: Optional[str]) -> None:
"""
Create a new orchestrator.
@ -552,8 +592,9 @@ class BurnInOrchestrator:
self.change_detector = change_detector
self.burn_in_executor = burn_in_executor
self.evg_conf = evg_conf
self.install_dir = install_dir
def burn_in(self, repos: List[Repo], build_variant: str, install_dir: str) -> None:
def burn_in(self, repos: List[Repo], build_variant: str) -> None:
"""
Execute burn in tests for the given git repositories.
@ -564,7 +605,7 @@ class BurnInOrchestrator:
LOGGER.info("Found changed tests", files=changed_tests)
tests_by_task = create_tests_by_task(build_variant, self.evg_conf, changed_tests,
install_dir)
self.install_dir)
LOGGER.debug("tests and tasks found", tests_by_task=tests_by_task)
self.burn_in_executor.execute(tests_by_task)
@ -584,18 +625,20 @@ class BurnInOrchestrator:
help="The maximum number of times to repeat tests if time option is specified.")
@click.option("--repeat-tests-secs", "repeat_tests_secs", default=None, type=int, metavar="SECONDS",
help="Repeat tests for the given time (in secs).")
@click.option("--yaml", "use_yaml", is_flag=True, default=False,
help="Output discovered tasks in YAML. Tests will not be run.")
@click.option("--verbose", "verbose", default=False, is_flag=True, help="Enable extra logging.")
@click.option(
"--origin-rev", "origin_rev", default=None,
help="The revision in the mongo repo that changes will be compared against if specified.")
@click.option("--install-dir", "install_dir", required=True, type=str,
@click.option("--install-dir", "install_dir", type=str,
help="Path to bin directory of a testable installation")
@click.argument("resmoke_args", nargs=-1, type=click.UNPROCESSED)
# pylint: disable=too-many-arguments,too-many-locals
def main(build_variant: str, no_exec: bool, repeat_tests_num: Optional[int],
repeat_tests_min: Optional[int], repeat_tests_max: Optional[int],
repeat_tests_secs: Optional[int], resmoke_args: str, verbose: bool,
origin_rev: Optional[str], install_dir: str) -> None:
origin_rev: Optional[str], install_dir: Optional[str], use_yaml: bool) -> None:
"""
Run new or changed tests in repeated mode to validate their stability.
@ -639,11 +682,13 @@ def main(build_variant: str, no_exec: bool, repeat_tests_num: Optional[int],
change_detector = LocalFileChangeDetector(origin_rev)
executor = LocalBurnInExecutor(resmoke_args, repeat_config)
if no_exec:
if use_yaml:
executor = YamlBurnInExecutor()
elif no_exec:
executor = NopBurnInExecutor()
burn_in_orchestrator = BurnInOrchestrator(change_detector, executor, evg_conf)
burn_in_orchestrator.burn_in(repos, build_variant, install_dir)
burn_in_orchestrator = BurnInOrchestrator(change_detector, executor, evg_conf, install_dir)
burn_in_orchestrator.burn_in(repos, build_variant)
if __name__ == "__main__":

View File

@ -18,7 +18,7 @@ from buildscripts.resmokelib import utils # pylint: disable=wrong-import-positi
def main():
"""Main."""
"""Collect system resources."""
usage = "usage: %prog [options]"
parser = optparse.OptionParser(description=__doc__, usage=usage)
parser.add_option(

View File

@ -4,11 +4,13 @@ import json
import logging
import os
import pathlib
import re
import shutil
import subprocess
import sys
import time
import typing
from json import JSONDecoder
from typing import Optional, Tuple, Generator, Dict, List, NamedTuple
import requests
@ -20,30 +22,95 @@ from buildscripts.util.oauth import get_client_cred_oauth_credentials, Configs
from buildscripts.resmokelib.setup_multiversion.setup_multiversion import SetupMultiversion, download
from buildscripts.build_system_options import PathOptions
BUILD_INFO_RE = re.compile(r"Build Info: ({(\n.*)*})")
MONGOD = "mongod"
class LinuxBuildIDExtractor:
"""Parse readlef command output & extract Build ID."""
default_executable_path = "readelf"
def __init__(self, executable_path: str = None):
"""Initialize instance."""
self.executable_path = executable_path or self.default_executable_path
def callreadelf(self, binary_path: str) -> str:
"""Call readelf command for given binary & return string output."""
args = [self.executable_path, "-n", binary_path]
process = subprocess.Popen(args=args, close_fds=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
process.wait()
return process.stdout.read().decode()
class CmdClient:
"""Client to run commands."""
@staticmethod
def extractbuildid(out: str) -> typing.Optional[str]:
"""Parse readelf output and extract Build ID from it."""
def run(args: List[str]) -> str:
"""
Run command with args.
:param args: Argument list.
:return: Command output.
"""
out = subprocess.run(args, close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
check=False)
return out.stdout.strip().decode()
class BuildIdOutput(NamedTuple):
"""
Build ID and command output.
* build_id: Build ID or None.
* cmd_output: Command output.
"""
build_id: Optional[str]
cmd_output: str
class BinVersionOutput(NamedTuple):
"""
Mongodb bin version and command output.
* mongodb_version: Bin version.
* cmd_output: Command output.
"""
mongodb_version: Optional[str]
cmd_output: str
class CmdOutputExtractor:
"""Data extractor from command output."""
def __init__(self, cmd_client: Optional[CmdClient] = None,
json_decoder: Optional[JSONDecoder] = None) -> None:
"""
Initialize.
:param cmd_client: Client to run commands.
:param json_decoder: JSONDecoder object.
"""
self.cmd_client = cmd_client if cmd_client is not None else CmdClient()
self.json_decoder = json_decoder if json_decoder is not None else JSONDecoder()
def get_build_id(self, bin_path: str) -> BuildIdOutput:
"""
Get build ID from readelf command.
:param bin_path: Path to binary of the build.
:return: Build ID or None and command output.
"""
out = self.cmd_client.run(["readelf", "-n", bin_path])
build_id = self._extract_build_id(out)
return BuildIdOutput(build_id, out)
def get_bin_version(self, bin_path: str) -> BinVersionOutput:
"""
Get mongodb bin version from `{bin} --version` command.
:param bin_path: Path to mongodb binary.
:return: Bin version or None and command output.
"""
out = self.cmd_client.run([os.path.abspath(bin_path), "--version"])
mongodb_version = self._get_mongodb_version(out)
return BinVersionOutput(mongodb_version, out)
@staticmethod
def _extract_build_id(out: str) -> Optional[str]:
"""
Parse readelf output and extract Build ID from it.
:param out: readelf command output.
:return: Build ID on None.
"""
build_id = None
for line in out.splitlines():
line = line.strip()
@ -53,13 +120,21 @@ class LinuxBuildIDExtractor:
build_id = line.split(': ')[1]
return build_id
def run(self, binary_path: str) -> typing.Tuple[str, str]:
"""Perform all necessary actions to get Build ID."""
def _get_mongodb_version(self, out: str) -> Optional[str]:
"""
Parse version command output and extract mongodb version.
readelfout = self.callreadelf(binary_path)
buildid = self.extractbuildid(readelfout)
:param out: Version command output.
:return: Version or None.
"""
mongodb_version = None
return buildid, readelfout
search = BUILD_INFO_RE.search(out)
if search:
build_info = self.json_decoder.decode(search.group(1))
mongodb_version = build_info.get("version")
return mongodb_version
class DownloadOptions(object):
@ -88,19 +163,22 @@ class Mapper:
default_client_credentials_user_name = "client-user"
default_creds_file_path = os.path.join(os.getcwd(), '.symbolizer_credentials.json')
def __init__(self, version: str, client_id: str, client_secret: str, variant: str,
def __init__(self, evg_version: str, evg_variant: str, client_id: str, client_secret: str,
cache_dir: str = None, web_service_base_url: str = None,
logger: logging.Logger = None):
"""
Initialize instance.
:param version: version string
:param variant: build variant string
:param cache_dir: full path to cache directory as a string
:param web_service_base_url: URL of symbolizer web service
:param evg_version: Evergreen version ID.
:param evg_variant: Evergreen build variant name.
:param client_id: Client id for Okta Oauth.
:param client_secret: Secret key for Okta Oauth.
:param cache_dir: Full path to cache directory as a string.
:param web_service_base_url: URL of symbolizer web service.
:param logger: Debug symbols mapper logger.
"""
self.version = version
self.variant = variant
self.evg_version = evg_version
self.evg_variant = evg_variant
self.cache_dir = cache_dir or self.default_cache_dir
self.web_service_base_url = web_service_base_url or self.default_web_service_base_url
@ -113,8 +191,8 @@ class Mapper:
self.http_client = requests.Session()
self.multiversion_setup = SetupMultiversion(
DownloadOptions(download_symbols=True, download_binaries=True), variant=self.variant,
ignore_failed_push=True)
DownloadOptions(download_symbols=True, download_binaries=True),
variant=self.evg_variant, ignore_failed_push=True)
self.debug_symbols_url = None
self.url = None
self.configs = Configs(
@ -139,7 +217,7 @@ class Mapper:
data = json.loads(cfile.read())
access_token, expire_time = data.get("access_token"), data.get("expire_time")
if time.time() < expire_time:
# credentials hasn't expired yet
# credentials haven't expired yet
self.http_client.headers.update({"Authorization": f"Bearer {access_token}"})
return
@ -147,7 +225,7 @@ class Mapper:
configs=self.configs)
self.http_client.headers.update({"Authorization": f"Bearer {credentials.access_token}"})
# write credentials to local file for further useage
# write credentials to local file for further usage
with open(self.default_creds_file_path, "w") as cfile:
cfile.write(
json.dumps({
@ -184,7 +262,7 @@ class Mapper:
def setup_urls(self):
"""Set up URLs using multiversion."""
urlinfo = self.multiversion_setup.get_urls(self.version, self.variant)
urlinfo = self.multiversion_setup.get_urls(self.evg_version, self.evg_variant)
download_symbols_url = urlinfo.urls.get("mongo-debugsymbols.tgz", None)
binaries_url = urlinfo.urls.get("Binaries", "")
@ -194,7 +272,7 @@ class Mapper:
if not download_symbols_url:
self.logger.error("Couldn't find URL for debug symbols. Version: %s, URLs dict: %s",
self.version, urlinfo.urls)
self.evg_version, urlinfo.urls)
raise ValueError(f"Debug symbols URL not found. URLs dict: {urlinfo.urls}")
self.debug_symbols_url = download_symbols_url
@ -233,14 +311,14 @@ class Mapper:
tarball_full_path = download.download_from_s3(url)
return tarball_full_path
def generate_build_id_mapping(self) -> typing.Generator[typing.Dict[str, str], None, None]:
def generate_build_id_mapping(self) -> Generator[Dict[str, str], None, None]:
"""
Extract build id from binaries and creates new dict using them.
:return: mapped data as dict
"""
readelf_extractor = LinuxBuildIDExtractor()
extractor = CmdOutputExtractor()
debug_symbols_path = self.download(self.debug_symbols_url)
debug_symbols_unpacked_path = self.unpack(debug_symbols_path)
@ -262,6 +340,17 @@ class Mapper:
self.logger.info("INSIDE unpacked binaries/dist-test: %s",
os.listdir(binaries_unpacked_path))
mongod_bin = os.path.join(binaries_unpacked_path, self.path_options.main_binary_folder_name,
MONGOD)
bin_version_output = extractor.get_bin_version(mongod_bin)
if bin_version_output.mongodb_version is None:
self.logger.error("mongodb version could not be extracted. \n`%s --version` output: %s",
mongod_bin, bin_version_output.cmd_output)
return
else:
self.logger.info("Extracted mongodb version: %s", bin_version_output.mongodb_version)
# start with main binary folder
for binary in self.selected_binaries:
full_bin_path = os.path.join(debug_symbols_unpacked_path,
@ -271,16 +360,21 @@ class Mapper:
self.logger.error("Could not find binary at %s", full_bin_path)
return
build_id, readelf_out = readelf_extractor.run(full_bin_path)
build_id_output = extractor.get_build_id(full_bin_path)
if not build_id:
if not build_id_output.build_id:
self.logger.error("Build ID couldn't be extracted. \nReadELF output %s",
readelf_out)
build_id_output.cmd_output)
return
else:
self.logger.info("Extracted build ID: %s", build_id_output.build_id)
yield {
'url': self.url, 'debug_symbols_url': self.debug_symbols_url, 'build_id': build_id,
'file_name': binary, 'version': self.version
'url': self.url,
'debug_symbols_url': self.debug_symbols_url,
'build_id': build_id_output.build_id,
'file_name': binary,
'version': bin_version_output.mongodb_version,
}
# move to shared libraries folder.
@ -306,18 +400,21 @@ class Mapper:
self.logger.error("Could not find binary at %s", sofile_path)
return
build_id, readelf_out = readelf_extractor.run(sofile_path)
build_id_output = extractor.get_build_id(sofile_path)
if not build_id:
self.logger.error("Build ID couldn't be extracted. \nReadELF out %s", readelf_out)
if not build_id_output.build_id:
self.logger.error("Build ID couldn't be extracted. \nReadELF out %s",
build_id_output.cmd_output)
return
else:
self.logger.info("Extracted build ID: %s", build_id_output.build_id)
yield {
'url': self.url,
'debug_symbols_url': self.debug_symbols_url,
'build_id': build_id,
'build_id': build_id_output.build_id,
'file_name': sofile,
'version': self.version,
'version': bin_version_output.mongodb_version,
}
def run(self):
@ -355,8 +452,8 @@ def make_argument_parser(parser=None, **kwargs):
def main(options):
"""Execute mapper here. Main entry point."""
mapper = Mapper(version=options.version, variant=options.variant, client_id=options.client_id,
client_secret=options.client_secret,
mapper = Mapper(evg_version=options.version, evg_variant=options.variant,
client_id=options.client_id, client_secret=options.client_secret,
web_service_base_url=options.web_service_base_url)
# when used as a context manager, mapper instance automatically cleans files/folders after finishing its job.

View File

@ -46,6 +46,7 @@ _CODE_PATTERNS = [
r"(?:StatusOK)?"
r"(?:WithContext)?"
r"\s*\(",
r"MONGO_UNREACHABLE_TASSERT\(",
# DBException and AssertionException constructors
r"(?:DB|Assertion)Exception\s*[({]",
# Calls to all LOGV2* variants
@ -239,14 +240,15 @@ def read_error_codes(src_root='src/mongo'):
def replace_bad_codes(errors, next_code_generator): # pylint: disable=too-many-locals
"""Modify C++ source files to replace invalid assertion codes.
"""
Modify C++ source files to replace invalid assertion codes.
For now, we only modify zero codes.
Args:
errors: list of AssertLocation
next_code_generator: generator -> int, next non-conflicting assertion code
:param errors: list of AssertLocation
:param next_code_generator: generator -> int, next non-conflicting assertion code
"""
zero_errors = [e for e in errors if int(e.code) == 0]
skip_errors = [e for e in errors if int(e.code) != 0]
@ -296,7 +298,7 @@ def coerce_to_number(ticket_value):
def main():
"""Main."""
"""Validate error codes."""
parser = OptionParser(description=__doc__.strip())
parser.add_option("--fix", dest="replace", action="store_true", default=False,
help="Fix zero codes in source files [default: %default]")

View File

@ -34,7 +34,6 @@ DEFAULT_VARIANT = "enterprise-rhel-80-64-bit-dynamic-required"
BURN_IN_TESTS_GEN_TASK = "burn_in_tests_gen"
BURN_IN_TESTS_TASK = "burn_in_tests"
BURN_IN_ENV_VAR = "BURN_IN_TESTS"
AVG_TEST_RUNTIME_ANALYSIS_DAYS = 14
AVG_TEST_SETUP_SEC = 4 * 60
AVG_TEST_TIME_MULTIPLIER = 3
MIN_AVG_TEST_OVERFLOW_SEC = float(60)
@ -328,23 +327,17 @@ class GenerateBurnInExecutor(BurnInExecutor):
# pylint: disable=too-many-arguments
def __init__(self, generate_config: GenerateConfig, repeat_config: RepeatConfig,
evg_api: EvergreenApi, generate_tasks_file: Optional[str] = None,
history_end_date: Optional[datetime] = None) -> None:
generate_tasks_file: Optional[str] = None) -> None:
"""
Create a new generate burn-in executor.
:param generate_config: Configuration for how to generate tasks.
:param repeat_config: Configuration for how tests should be repeated.
:param evg_api: Evergreen API client.
:param generate_tasks_file: File to write generated task configuration to.
:param history_end_date: End date of range to query for historic test data.
"""
self.generate_config = generate_config
self.repeat_config = repeat_config
self.evg_api = evg_api
self.generate_tasks_file = generate_tasks_file
self.history_end_date = history_end_date if history_end_date else datetime.utcnow()\
.replace(microsecond=0)
def get_task_runtime_history(self, task: str) -> List[TestRuntime]:
"""
@ -353,21 +346,10 @@ class GenerateBurnInExecutor(BurnInExecutor):
:param task: Task to query.
:return: List of runtime histories for all tests in specified task.
"""
try:
project = self.generate_config.project
variant = self.generate_config.build_variant
end_date = self.history_end_date
start_date = end_date - timedelta(days=AVG_TEST_RUNTIME_ANALYSIS_DAYS)
test_stats = HistoricTaskData.from_evg(self.evg_api, project, start_date=start_date,
end_date=end_date, task=task, variant=variant)
return test_stats.get_tests_runtimes()
except requests.HTTPError as err:
if err.response.status_code == requests.codes.SERVICE_UNAVAILABLE:
# Evergreen may return a 503 when the service is degraded.
# We fall back to returning no test history
return []
else:
raise
project = self.generate_config.project
variant = self.generate_config.build_variant
test_stats = HistoricTaskData.from_s3(project, task, variant)
return test_stats.get_tests_runtimes()
def _get_existing_tasks(self) -> Optional[Set[ExistingTask]]:
"""Get any existing tasks that should be included in the generated display task."""
@ -434,10 +416,10 @@ def burn_in(task_id: str, build_variant: str, generate_config: GenerateConfig,
:param install_dir: Path to bin directory of a testable installation
"""
change_detector = EvergreenFileChangeDetector(task_id, evg_api, os.environ)
executor = GenerateBurnInExecutor(generate_config, repeat_config, evg_api, generate_tasks_file)
executor = GenerateBurnInExecutor(generate_config, repeat_config, generate_tasks_file)
burn_in_orchestrator = BurnInOrchestrator(change_detector, executor, evg_conf)
burn_in_orchestrator.burn_in(repos, build_variant, install_dir)
burn_in_orchestrator = BurnInOrchestrator(change_detector, executor, evg_conf, install_dir)
burn_in_orchestrator.burn_in(repos, build_variant)
@click.command()

View File

@ -1,14 +1,15 @@
#!/usr/bin/env python3
"""Determine the timeout value a task should use in evergreen."""
from __future__ import annotations
import argparse
import math
import os
import shlex
import sys
from datetime import datetime, timedelta
from datetime import timedelta
from pathlib import Path
from typing import Dict, List, Optional
import shlex
import inject
import structlog
@ -16,9 +17,9 @@ import yaml
from pydantic import BaseModel
from evergreen import EvergreenApi, RetryingEvergreenApi
from buildscripts.task_generation.resmoke_proxy import ResmokeProxyService
from buildscripts.ciconfig.evergreen import (EvergreenProjectConfig, parse_evergreen_file)
from buildscripts.timeouts.timeout_service import (TimeoutParams, TimeoutService, TimeoutSettings)
from buildscripts.task_generation.resmoke_proxy import ResmokeProxyService
from buildscripts.timeouts.timeout_service import (TimeoutParams, TimeoutService)
from buildscripts.util.cmdutils import enable_logging
from buildscripts.util.taskname import determine_task_base_name
@ -56,6 +57,18 @@ class TimeoutOverride(BaseModel):
exec_timeout: Optional[int] = None
idle_timeout: Optional[int] = None
@classmethod
def from_seconds(cls, task: str, exec_timeout_secs: Optional[float],
idle_timeout_secs: Optional[float]) -> TimeoutOverride:
"""Create an instance of an override from seconds."""
exec_timeout = exec_timeout_secs / 60 if exec_timeout_secs else None
idle_timeout = idle_timeout_secs / 60 if idle_timeout_secs else None
return cls(
task=task,
exec_timeout=exec_timeout,
idle_timeout=idle_timeout,
)
def get_exec_timeout(self) -> Optional[timedelta]:
"""Get a timedelta of the exec timeout to use."""
if self.exec_timeout is not None:
@ -173,14 +186,16 @@ class TaskTimeoutOrchestrator:
:param timeout_service: Service for calculating historic timeouts.
:param timeout_overrides: Timeout overrides for specific tasks.
:param evg_project_config: Evergreen project configuration.
"""
self.timeout_service = timeout_service
self.timeout_overrides = timeout_overrides
self.evg_project_config = evg_project_config
def determine_exec_timeout(
self, task_name: str, variant: str, idle_timeout: Optional[timedelta] = None,
exec_timeout: Optional[timedelta] = None, evg_alias: str = "") -> timedelta:
def determine_exec_timeout(self, task_name: str, variant: str,
idle_timeout: Optional[timedelta] = None,
exec_timeout: Optional[timedelta] = None, evg_alias: str = "",
historic_timeout: Optional[timedelta] = None) -> timedelta:
"""
Determine what exec timeout should be used.
@ -189,9 +204,12 @@ class TaskTimeoutOrchestrator:
:param idle_timeout: Idle timeout if specified.
:param exec_timeout: Override to use for exec_timeout or 0 if no override.
:param evg_alias: Evergreen alias running the task.
:param historic_timeout: Timeout determined by looking at previous task executions.
:return: Exec timeout to use for running task.
"""
determined_timeout = DEFAULT_NON_REQUIRED_BUILD_TIMEOUT
if historic_timeout is not None:
determined_timeout = historic_timeout
override = self.timeout_overrides.lookup_exec_override(variant, task_name)
@ -200,25 +218,26 @@ class TaskTimeoutOrchestrator:
exec_timeout_secs=exec_timeout.total_seconds())
determined_timeout = exec_timeout
elif override is not None:
LOGGER.info("Overriding configured timeout", exec_timeout_secs=override.total_seconds())
determined_timeout = override
elif task_name == UNITTEST_TASK and override is None:
LOGGER.info("Overriding unittest timeout",
exec_timeout_secs=UNITTESTS_TIMEOUT.total_seconds())
determined_timeout = UNITTESTS_TIMEOUT
elif _is_required_build_variant(
variant) and determined_timeout > DEFAULT_REQUIRED_BUILD_TIMEOUT:
LOGGER.info("Overriding required-builder timeout",
exec_timeout_secs=DEFAULT_REQUIRED_BUILD_TIMEOUT.total_seconds())
determined_timeout = DEFAULT_REQUIRED_BUILD_TIMEOUT
elif evg_alias == COMMIT_QUEUE_ALIAS:
LOGGER.info("Overriding commit-queue timeout",
exec_timeout_secs=COMMIT_QUEUE_TIMEOUT.total_seconds())
determined_timeout = COMMIT_QUEUE_TIMEOUT
elif override is not None:
LOGGER.info("Overriding configured timeout", exec_timeout_secs=override.total_seconds())
determined_timeout = override
elif _is_required_build_variant(variant):
LOGGER.info("Overriding required-builder timeout",
exec_timeout_secs=DEFAULT_REQUIRED_BUILD_TIMEOUT.total_seconds())
determined_timeout = DEFAULT_REQUIRED_BUILD_TIMEOUT
# The timeout needs to be at least as large as the idle timeout.
if idle_timeout and determined_timeout.total_seconds() < idle_timeout.total_seconds():
LOGGER.info("Making exec timeout as large as idle timeout",
@ -228,16 +247,19 @@ class TaskTimeoutOrchestrator:
return determined_timeout
def determine_idle_timeout(self, task_name: str, variant: str,
idle_timeout: Optional[timedelta] = None) -> Optional[timedelta]:
idle_timeout: Optional[timedelta] = None,
historic_timeout: Optional[timedelta] = None) -> Optional[timedelta]:
"""
Determine what idle timeout should be used.
:param task_name: Name of task being run.
:param variant: Name of build variant being run.
:param idle_timeout: Override to use for idle_timeout.
:param historic_timeout: Timeout determined by looking at previous task executions.
:return: Idle timeout to use for running task.
"""
determined_timeout = None
determined_timeout = historic_timeout
override = self.timeout_overrides.lookup_idle_override(variant, task_name)
if idle_timeout and idle_timeout.total_seconds() != 0:
@ -252,7 +274,7 @@ class TaskTimeoutOrchestrator:
return determined_timeout
def determine_historic_timeout(self, task: str, variant: str, suite_name: str,
exec_timeout_factor: Optional[float]) -> Optional[timedelta]:
exec_timeout_factor: Optional[float]) -> TimeoutOverride:
"""
Calculate the timeout based on historic test results.
@ -262,7 +284,7 @@ class TaskTimeoutOrchestrator:
:param exec_timeout_factor: Scaling factor to use when determining timeout.
"""
if suite_name in IGNORED_SUITES:
return None
return TimeoutOverride(task=task, exec_timeout=None, idle_timeout=None)
timeout_params = TimeoutParams(
evg_project="mongodb-mongo-master",
@ -275,10 +297,12 @@ class TaskTimeoutOrchestrator:
if timeout_estimate and timeout_estimate.is_specified():
exec_timeout = timeout_estimate.calculate_task_timeout(
repeat_factor=1, scaling_factor=exec_timeout_factor)
if exec_timeout is not None:
LOGGER.info("Using historic based timeout", exec_timeout_secs=exec_timeout)
return timedelta(seconds=exec_timeout)
return None
idle_timeout = timeout_estimate.calculate_test_timeout(repeat_factor=1)
if exec_timeout is not None or idle_timeout is not None:
LOGGER.info("Getting historic based timeout", exec_timeout_secs=exec_timeout,
idle_timeout_secs=idle_timeout)
return TimeoutOverride.from_seconds(task, exec_timeout, idle_timeout)
return TimeoutOverride(task=task, exec_timeout=None, idle_timeout=None)
def is_build_variant_asan(self, build_variant: str) -> bool:
"""
@ -305,14 +329,13 @@ class TaskTimeoutOrchestrator:
:param suite_name: Name of evergreen suite being run.
:param exec_timeout_factor: Scaling factor to use when determining timeout.
"""
idle_timeout = self.determine_idle_timeout(task, variant, cli_idle_timeout)
exec_timeout = self.determine_exec_timeout(task, variant, idle_timeout, cli_exec_timeout,
evg_alias)
historic_timeout = self.determine_historic_timeout(task, variant, suite_name,
exec_timeout_factor)
if historic_timeout:
exec_timeout = historic_timeout
idle_timeout = self.determine_idle_timeout(task, variant, cli_idle_timeout,
historic_timeout.get_idle_timeout())
exec_timeout = self.determine_exec_timeout(task, variant, idle_timeout, cli_exec_timeout,
evg_alias, historic_timeout.get_exec_timeout())
output_timeout(exec_timeout, idle_timeout, outfile)
@ -346,9 +369,6 @@ def main():
options = parser.parse_args()
end_date = datetime.now()
start_date = end_date - HISTORY_LOOKBACK
timeout_override = timedelta(seconds=options.timeout) if options.timeout else None
exec_timeout_override = timedelta(
seconds=options.exec_timeout) if options.exec_timeout else None
@ -363,7 +383,6 @@ def main():
binder.bind(
EvergreenApi,
RetryingEvergreenApi.get_api(config_file=os.path.expanduser(options.evg_api_config)))
binder.bind(TimeoutSettings, TimeoutSettings(start_date=start_date, end_date=end_date))
binder.bind(TimeoutOverrides, timeout_overrides)
binder.bind(EvergreenProjectConfig,
parse_evergreen_file(os.path.expanduser(options.evg_project_config)))

View File

@ -69,7 +69,7 @@ def get_current_thread_name():
fallback_name = '"%s"' % (gdb.selected_thread().name or '')
try:
# This goes through the pretty printer for StringData which adds "" around the name.
name = str(gdb.parse_and_eval("mongo::ThreadName::getStaticString()"))
name = str(gdb.parse_and_eval("mongo::getThreadName()"))
if name == '""':
return fallback_name
return name
@ -318,75 +318,100 @@ class DumpMongoDSessionCatalog(gdb.Command):
else:
lsids_to_print = [str(s['first']['_id']) for s in session_kv_pairs]
for sess_kv in session_kv_pairs:
# The Session is stored inside the SessionRuntimeInfo object.
session_runtime_info = get_unique_ptr(sess_kv['second']).dereference() # pylint: disable=undefined-variable
session = session_runtime_info['session']
# TODO: Add a custom pretty printer for LogicalSessionId.
lsid_str = str(session['_sessionId']['_id'])
for session_kv in session_kv_pairs:
# The Session objects are stored inside the SessionRuntimeInfo object.
session_runtime_info = get_unique_ptr(session_kv['second']).dereference() # pylint: disable=undefined-variable
parent_session = session_runtime_info['parentSession']
child_sessions = absl_get_nodes(session_runtime_info['childSessions']) # pylint: disable=undefined-variable
lsid = str(parent_session['_sessionId']['_id'])
# If we are only interested in a specific session, then we print out the entire Session
# object, to aid more detailed debugging.
if lsid_str == lsid_to_find:
print("SessionId", "=", lsid_str)
print(session)
# objects, to aid more detailed debugging.
if lsid == lsid_to_find:
self.dump_session_runtime_info(session_runtime_info)
print(parent_session)
for child_session_kv in child_sessions:
child_session = child_session_kv['second']
print(child_session)
# Terminate if this is the only session we care about.
break
# Only print info for the necessary sessions.
if lsid_str not in lsids_to_print:
if lsid not in lsids_to_print:
continue
# If we are printing multiple sessions, we only print the most interesting fields from
# the Session object for the sake of efficiency. We print the session id string first so
# the session is easily identifiable.
print("Session (" + str(session.address) + "):")
print("SessionId", "=", lsid_str)
session_fields_to_print = ['_checkoutOpCtx', '_killsRequested']
for field in session_fields_to_print:
# If we are printing multiple sessions, we only print the most interesting fields for
# each Session object for the sake of efficiency.
self.dump_session_runtime_info(session_runtime_info)
self.dump_session(parent_session)
for child_session_kv in child_sessions:
child_session = child_session_kv['second']
self.dump_session(child_session)
@staticmethod
def dump_session_runtime_info(session_runtime_info):
"""Dump the session runtime info."""
parent_session = session_runtime_info['parentSession']
# TODO: Add a custom pretty printer for LogicalSessionId.
lsid = str(parent_session['_sessionId']['_id'])[1:-1]
print("SessionId =", lsid)
fields_to_print = ['checkoutOpCtx', 'killsRequested']
for field in fields_to_print:
# Skip fields that aren't found on the object.
if field in get_field_names(session_runtime_info):
print(field, "=", session_runtime_info[field])
else:
print("Could not find field '%s' on the SessionRuntimeInfo object." % field)
print("")
@staticmethod
def dump_session(session):
"""Dump the session."""
print("Session (" + str(session.address) + "):")
fields_to_print = ['_sessionId', '_numWaitingToCheckOut']
for field in fields_to_print:
# Skip fields that aren't found on the object.
if field in get_field_names(session):
print(field, "=", session[field])
else:
print("Could not find field '%s' on the SessionRuntimeInfo object." % field)
# Print the information from a TransactionParticipant if a session has one.
txn_part_dec = get_decoration(session, "TransactionParticipant")
if txn_part_dec:
# Only print the most interesting fields for debugging transactions issues. The
# TransactionParticipant class encapsulates internal state in two distinct
# structures: a 'PrivateState' type (stored in private field '_p') and an
# 'ObservableState' type (stored in private field '_o'). The information we care
# about here is all contained inside the 'ObservableState', so we extract fields
# from that object. If, in the future, we want to print fields from the
# 'PrivateState' object, we can inspect the TransactionParticipant's '_p' field.
txn_part = txn_part_dec[1]
txn_part_observable_state = txn_part['_o']
fields_to_print = ['txnState', 'activeTxnNumberAndRetryCounter']
print("TransactionParticipant (" + str(txn_part.address) + "):")
for field in fields_to_print:
# Skip fields that aren't found on the object.
if field in get_field_names(session):
print(field, "=", session[field])
if field in get_field_names(txn_part_observable_state):
print(field, "=", txn_part_observable_state[field])
else:
print("Could not find field '%s' on the Session object." % field)
print("Could not find field '%s' on the TransactionParticipant" % field)
# Print the information from a TransactionParticipant if a session has one. Otherwise
# we just print the session's id and nothing else.
txn_part_dec = get_decoration(session, "TransactionParticipant")
if txn_part_dec:
# Only print the most interesting fields for debugging transactions issues. The
# TransactionParticipant class encapsulates internal state in two distinct
# structures: a 'PrivateState' type (stored in private field '_p') and an
# 'ObservableState' type (stored in private field '_o'). The information we care
# about here is all contained inside the 'ObservableState', so we extract fields
# from that object. If, in the future, we want to print fields from the
# 'PrivateState' object, we can inspect the TransactionParticipant's '_p' field.
txn_part = txn_part_dec[1]
txn_part_observable_state = txn_part['_o']
fields_to_print = ['txnState', 'activeTxnNumber']
print("TransactionParticipant (" + str(txn_part.address) + "):")
for field in fields_to_print:
# Skip fields that aren't found on the object.
if field in get_field_names(txn_part_observable_state):
print(field, "=", txn_part_observable_state[field])
else:
print("Could not find field '%s' on the TransactionParticipant" % field)
# The 'txnResourceStash' field is a boost::optional so we unpack it manually if it
# is non-empty. We are only interested in its Locker object for now. TODO: Load the
# boost pretty printers so the object will be printed clearly by default, without
# the need for special unpacking.
val = get_boost_optional(txn_part_observable_state['txnResourceStash'])
if val:
locker_addr = get_unique_ptr(val["_locker"]) # pylint: disable=undefined-variable
locker_obj = locker_addr.dereference().cast(
gdb.lookup_type("mongo::LockerImpl"))
print('txnResourceStash._locker', "@", locker_addr)
print("txnResourceStash._locker._id", "=", locker_obj["_id"])
else:
print('txnResourceStash', "=", None)
# Separate sessions by a newline.
print("")
# The 'txnResourceStash' field is a boost::optional so we unpack it manually if it
# is non-empty. We are only interested in its Locker object for now. TODO: Load the
# boost pretty printers so the object will be printed clearly by default, without
# the need for special unpacking.
val = get_boost_optional(txn_part_observable_state['txnResourceStash'])
if val:
locker_addr = get_unique_ptr(val["_locker"]) # pylint: disable=undefined-variable
locker_obj = locker_addr.dereference().cast(gdb.lookup_type("mongo::LockerImpl"))
print('txnResourceStash._locker', "@", locker_addr)
print("txnResourceStash._locker._id", "=", locker_obj["_id"])
else:
print('txnResourceStash', "=", None)
print("")
# Register command
@ -536,39 +561,51 @@ class MongoDBDumpRecoveryUnits(gdb.Command):
# Dump stashed recovery unit info for each session in a mongod process
for session_kv in get_session_kv_pairs():
session_runtime_info = get_unique_ptr(session_kv["second"]).dereference() # pylint: disable=undefined-variable
session = session_runtime_info["session"]
# The Session objects are stored inside the SessionRuntimeInfo object.
session_runtime_info = get_unique_ptr(session_kv['second']).dereference() # pylint: disable=undefined-variable
parent_session = session_runtime_info['parentSession']
child_sessions = absl_get_nodes(session_runtime_info['childSessions']) # pylint: disable=undefined-variable
# Prepare structured output doc
session_lsid = str(session["_sessionId"]["_id"])[1:-1]
txn_participant_dec = get_decoration(session, "TransactionParticipant")
output_doc = {"session": session_lsid, "txnResourceStash": "0x0"}
recovery_unit_handle = None
recovery_unit = None
if txn_participant_dec:
txn_participant_observable_state = txn_participant_dec[1]["_o"]
txn_resource_stash = get_boost_optional(
txn_participant_observable_state["txnResourceStash"])
if txn_resource_stash:
output_doc["txnResourceStash"] = str(txn_resource_stash.address)
recovery_unit_handle = get_unique_ptr(txn_resource_stash["_recoveryUnit"]) # pylint: disable=undefined-variable
# By default, cast the recovery unit as "mongo::WiredTigerRecoveryUnit"
recovery_unit = recovery_unit_handle.dereference().cast(
gdb.lookup_type(recovery_unit_impl_type))
output_doc["recoveryUnit"] = hex(recovery_unit_handle) if recovery_unit else "0x0"
wt_session = get_wt_session(recovery_unit, recovery_unit_impl_type)
if wt_session:
output_doc["WT_SESSION"] = hex(wt_session)
print(json.dumps(output_doc))
if recovery_unit:
print(recovery_unit)
MongoDBDumpRecoveryUnits.dump_session(parent_session, recovery_unit_impl_type)
for child_session_kv in child_sessions:
child_session = child_session_kv['second']
MongoDBDumpRecoveryUnits.dump_session(child_session, recovery_unit_impl_type)
if enabled_at_start:
gdb.execute("set print static-members on")
@staticmethod
def dump_session(session, recovery_unit_impl_type):
"""Dump the session."""
# Prepare structured output doc
lsid = session["_sessionId"]
output_doc = {"session": str(lsid["_id"])[1:-1], "txnResourceStash": "0x0"}
txn_participant_dec = get_decoration(session, "TransactionParticipant")
recovery_unit_handle = None
recovery_unit = None
if txn_participant_dec:
txn_participant_observable_state = txn_participant_dec[1]["_o"]
txn_resource_stash = get_boost_optional(
txn_participant_observable_state["txnResourceStash"])
if txn_resource_stash:
output_doc["txnResourceStash"] = str(txn_resource_stash.address)
recovery_unit_handle = get_unique_ptr(txn_resource_stash["_recoveryUnit"]) # pylint: disable=undefined-variable
# By default, cast the recovery unit as "mongo::WiredTigerRecoveryUnit"
recovery_unit = recovery_unit_handle.dereference().cast(
gdb.lookup_type(recovery_unit_impl_type))
output_doc["recoveryUnit"] = hex(recovery_unit_handle) if recovery_unit else "0x0"
wt_session = get_wt_session(recovery_unit, recovery_unit_impl_type)
if wt_session:
output_doc["WT_SESSION"] = hex(wt_session)
print(json.dumps(output_doc))
print(lsid)
if recovery_unit:
print(recovery_unit)
# Register command
MongoDBDumpRecoveryUnits()
@ -726,7 +763,7 @@ class MongoDBJavaScriptStack(gdb.Command):
"""Print the JavaScript stack from a MongoDB process."""
# Looking to test your changes to this? Really easy!
# 1. install-core to build the mongo shell binary (mongo)
# 1. install-jstestshell to build the mongo shell binary (mongo)
# 2. launch it: ./path/to/bin/mongo --nodb
# 3. in the shell, run: sleep(99999999999). (do not use --eval)
# 4. ps ax | grep nodb to find the PID

View File

@ -579,6 +579,7 @@ def find_match_brackets(search, opening='<', closing='>'):
Example:
'Foo<T>::iterator<U>''
returns 5
"""
index = search.find(opening)
if index == -1:

View File

@ -7,9 +7,7 @@ $ python generate_compile_expansions.py --out compile_expansions.yml
"""
import argparse
import json
import os
import re
import sys
import shlex
import yaml
@ -25,7 +23,6 @@ def generate_expansions():
"""
args = parse_args()
expansions = {}
expansions.update(generate_version_expansions())
expansions.update(generate_scons_cache_expansions())
with open(args.out, "w") as out:
@ -40,39 +37,6 @@ def parse_args():
return parser.parse_args()
def generate_version_expansions():
"""Generate expansions from a version.json file if given, or $MONGO_VERSION."""
expansions = {}
if os.path.exists(VERSION_JSON):
with open(VERSION_JSON, "r") as fh:
data = fh.read()
version_data = json.loads(data)
version_line = version_data['version']
version_parts = match_verstr(version_line)
if not version_parts:
raise ValueError("Unable to parse version.json")
else:
if not os.getenv("MONGO_VERSION"):
raise Exception("$MONGO_VERSION not set and no version.json provided")
version_line = os.getenv("MONGO_VERSION").lstrip("r")
version_parts = match_verstr(version_line)
if not version_parts:
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["is_release"] = "false"
else:
expansions["suffix"] = version_line
expansions["src_suffix"] = "r{0}".format(version_line)
expansions["is_release"] = "true"
expansions["version"] = version_line
return expansions
def generate_scons_cache_expansions():
"""Generate scons cache expansions from some files and environment variables."""
expansions = {}
@ -101,21 +65,5 @@ def generate_scons_cache_expansions():
return expansions
def match_verstr(verstr):
"""Match a version string and capture the "extra" part.
If the version is a release like "2.3.4" or "2.3.4-rc0", this will return
None. If the version is a pre-release like "2.3.4-325-githash" or
"2.3.4-pre-", this will return "-pre-" or "-325-githash" If the version
begins with the letter 'r', it will also match, e.g. r2.3.4, r2.3.4-rc0,
r2.3.4-git234, r2.3.4-rc0-234-githash If the version is invalid (i.e.
doesn't start with "2.3.4" or "2.3.4-rc0", this will return False.
"""
res = re.match(r'^r?(?:\d+\.\d+\.\d+(?:-rc\d+|-alpha\d+)?)(-.*)?', verstr)
if not res:
return False
return res.groups()
if __name__ == "__main__":
generate_expansions()

View File

@ -7,9 +7,7 @@ $ python generate_compile_expansions.py --out compile_expansions.yml
"""
import argparse
import json
import os
import re
import sys
import shlex
import yaml
@ -25,7 +23,6 @@ def generate_expansions():
"""
args = parse_args()
expansions = {}
expansions.update(generate_version_expansions())
expansions.update(generate_scons_cache_expansions())
with open(args.out, "w") as out:
@ -40,39 +37,6 @@ def parse_args():
return parser.parse_args()
def generate_version_expansions():
"""Generate expansions from a version.json file if given, or $MONGO_VERSION."""
expansions = {}
if os.path.exists(VERSION_JSON):
with open(VERSION_JSON, "r") as fh:
data = fh.read()
version_data = json.loads(data)
version_line = version_data['version']
version_parts = match_verstr(version_line)
if not version_parts:
raise ValueError("Unable to parse version.json")
else:
if not os.getenv("MONGO_VERSION"):
raise Exception("$MONGO_VERSION not set and no version.json provided")
version_line = os.getenv("MONGO_VERSION").lstrip("r")
version_parts = match_verstr(version_line)
if not version_parts:
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["is_release"] = "false"
else:
expansions["suffix"] = version_line
expansions["src_suffix"] = "r{0}".format(version_line)
expansions["is_release"] = "true"
expansions["version"] = version_line
return expansions
def generate_scons_cache_expansions():
"""Generate scons cache expansions from some files and environment variables."""
expansions = {}
@ -125,21 +89,5 @@ def generate_scons_cache_expansions():
return expansions
def match_verstr(verstr):
"""Match a version string and capture the "extra" part.
If the version is a release like "2.3.4" or "2.3.4-rc0", this will return
None. If the version is a pre-release like "2.3.4-325-githash" or
"2.3.4-pre-", this will return "-pre-" or "-325-githash" If the version
begins with the letter 'r', it will also match, e.g. r2.3.4, r2.3.4-rc0,
r2.3.4-git234, r2.3.4-rc0-234-githash If the version is invalid (i.e.
doesn't start with "2.3.4" or "2.3.4-rc0", this will return False.
"""
res = re.match(r'^r?(?:\d+\.\d+\.\d+(?:-rc\d+|-alpha\d+)?)(-.*)?', verstr)
if not res:
return False
return res.groups()
if __name__ == "__main__":
generate_expansions()

View File

@ -0,0 +1,93 @@
#!/usr/bin/env python3
"""
Generate the version expansions file used by Evergreen as part of the push/release process.
Invoke by specifying an output file.
$ python generate_build_expansions.py --out version_expansions.yml
"""
import argparse
import json
import os
import re
import sys
import yaml
VERSION_JSON = "version.json"
def generate_expansions():
"""Entry point for the script.
This calls functions to generate version and scons cache expansions and
writes them to a file.
"""
args = parse_args()
expansions = {}
expansions.update(generate_version_expansions())
with open(args.out, "w") as out:
print("saving compile expansions to {0}: ({1})".format(args.out, expansions))
yaml.safe_dump(expansions, out, default_flow_style=False)
def parse_args():
"""Parse program arguments."""
parser = argparse.ArgumentParser()
parser.add_argument("--out", required=True)
return parser.parse_args()
def generate_version_expansions():
"""Generate expansions from a version.json file if given, or $MONGO_VERSION."""
expansions = {}
if os.path.exists(VERSION_JSON):
with open(VERSION_JSON, "r") as fh:
data = fh.read()
version_data = json.loads(data)
version_line = version_data['version']
version_parts = match_verstr(version_line)
if not version_parts:
raise ValueError("Unable to parse version.json")
else:
version_line = os.getenv("MONGO_VERSION")
if not version_line:
raise Exception("$MONGO_VERSION not set and no version.json provided")
version_line = version_line.lstrip("r")
version_parts = match_verstr(version_line)
if not version_parts:
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["is_release"] = "false"
else:
expansions["suffix"] = version_line
expansions["src_suffix"] = "r{0}".format(version_line)
expansions["is_release"] = "true"
expansions["version"] = version_line
return expansions
def match_verstr(verstr):
"""Match a version string and capture the "extra" part.
If the version is a release like "2.3.4" or "2.3.4-rc0", this will return
None. If the version is a pre-release like "2.3.4-325-githash" or
"2.3.4-pre-", this will return "-pre-" or "-325-githash" If the version
begins with the letter 'r', it will also match, e.g. r2.3.4, r2.3.4-rc0,
r2.3.4-git234, r2.3.4-rc0-234-githash If the version is invalid (i.e.
doesn't start with "2.3.4" or "2.3.4-rc0", this will return False.
"""
res = re.match(r'^r?(?:\d+\.\d+\.\d+(?:-rc\d+|-alpha\d+)?)(-.*)?', verstr)
if not res:
return False
return res.groups()
if __name__ == "__main__":
generate_expansions()

View File

@ -96,16 +96,16 @@ def list_commands_for_api(api_version: str, mongod_or_mongos: str, install_dir:
if mongod_or_mongos == "mongod":
logger = loggers.new_fixture_logger("MongoDFixture", 0)
logger.parent = LOGGER
fixture: interface.Fixture = fixturelib.make_fixture("MongoDFixture", logger, 0,
dbpath_prefix=dbpath.name,
mongod_executable=mongod_executable)
fixture: interface.Fixture = fixturelib.make_fixture(
"MongoDFixture", logger, 0, dbpath_prefix=dbpath.name,
mongod_executable=mongod_executable, mongod_options={"set_parameters": {}})
else:
logger = loggers.new_fixture_logger("ShardedClusterFixture", 0)
logger.parent = LOGGER
fixture = fixturelib.make_fixture("ShardedClusterFixture", logger, 0,
dbpath_prefix=dbpath.name,
mongos_executable=mongos_executable,
mongod_executable=mongod_executable, mongod_options={})
fixture = fixturelib.make_fixture(
"ShardedClusterFixture", logger, 0, dbpath_prefix=dbpath.name,
mongos_executable=mongos_executable, mongod_executable=mongod_executable,
mongod_options={"set_parameters": {}})
fixture.setup()
fixture.await_ready()
@ -178,6 +178,7 @@ def main():
def __init__(self):
self.INSTALL_DIR = args.install_dir # pylint: disable=invalid-name
self.command = ""
# pylint: disable=protected-access
configure_resmoke._update_config_vars(FakeArgs())

View File

@ -30,7 +30,6 @@ Generate a file containing a list of disabled feature flags.
Used by resmoke.py to run only feature flag tests.
"""
import argparse
import os
import sys
@ -43,6 +42,7 @@ sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '../../
# pylint: disable=wrong-import-position
import buildscripts.idl.lib as lib
from buildscripts.idl.idl import parser
def is_third_party_idl(idl_path: str) -> bool:
@ -56,13 +56,14 @@ def is_third_party_idl(idl_path: str) -> bool:
return False
def gen_all_feature_flags(idl_dir: str, import_dirs: List[str]):
def gen_all_feature_flags(idl_dir: str = os.getcwd()):
"""Generate a list of all feature flags."""
all_flags = []
for idl_path in sorted(lib.list_idls(idl_dir)):
if is_third_party_idl(idl_path):
continue
for feature_flag in lib.parse_idl(idl_path, import_dirs).spec.feature_flags:
doc = parser.parse_file(open(idl_path), idl_path)
for feature_flag in doc.spec.feature_flags:
if feature_flag.default.literal != "true":
all_flags.append(feature_flag.name)
@ -72,18 +73,17 @@ def gen_all_feature_flags(idl_dir: str, import_dirs: List[str]):
return list(set(all_flags) - set(force_disabled_flags))
def gen_all_feature_flags_file(filename: str = lib.ALL_FEATURE_FLAG_FILE):
"""Output generated list of feature flags to specified file."""
flags = gen_all_feature_flags()
with open(filename, "w") as output_file:
output_file.write("\n".join(flags))
print("Generated: ", os.path.realpath(output_file.name))
def main():
"""Run the main function."""
arg_parser = argparse.ArgumentParser(description=__doc__)
arg_parser.add_argument("--import-dir", dest="import_dirs", type=str, action="append",
help="Directory to search for IDL import files")
args = arg_parser.parse_args()
flags = gen_all_feature_flags(os.getcwd(), args.import_dirs)
with open(lib.ALL_FEATURE_FLAG_FILE, "w") as output_file:
for flag in flags:
output_file.write("%s\n" % flag)
gen_all_feature_flags_file()
if __name__ == '__main__':

View File

@ -72,6 +72,7 @@ _BINDATA_SUBTYPE = {
# },
"uuid": {'scalar': True, 'bindata_enum': 'newUUID'},
"md5": {'scalar': True, 'bindata_enum': 'MD5Type'},
"encrypt": {'scalar': True, 'bindata_enum': 'Encrypt'},
}

View File

@ -37,7 +37,6 @@ import inspect
import os
import sys
from typing import List, Union
from yaml import nodes
import yaml
from . import common

View File

@ -1001,7 +1001,7 @@ def _propagate_globals(spec):
idltype.cpp_type = _prefix_with_namespace(cpp_namespace, idltype.cpp_type)
def _parse(stream, error_file_name):
def parse_file(stream, error_file_name):
# type: (Any, str) -> syntax.IDLParsedSpec
"""
Parse a YAML document into an idl.syntax tree.
@ -1105,7 +1105,7 @@ def parse(stream, input_file_name, resolver):
"""
# pylint: disable=too-many-locals
root_doc = _parse(stream, input_file_name)
root_doc = parse_file(stream, input_file_name)
if root_doc.errors:
return root_doc
@ -1142,7 +1142,7 @@ def parse(stream, input_file_name, resolver):
# Parse imported file
with resolver.open(resolved_file_name) as file_stream:
parsed_doc = _parse(file_stream, resolved_file_name)
parsed_doc = parse_file(file_stream, resolved_file_name)
# Check for errors
if parsed_doc.errors:

View File

@ -707,7 +707,10 @@ def check_param_or_command_type_recursive(ctxt: IDLCompatibilityContext,
# Check that new variant types are a superset of old variant types.
for old_variant_type in old_variant_types:
for new_variant_type in new_variant_types:
if old_variant_type.name == new_variant_type.name:
# object->object_owned serialize to the same bson type. object_owned->object is
# not always safe so we only limit this special case to object->object_owned.
if (old_variant_type.name == "object" and new_variant_type.name == "object_owned") or \
old_variant_type.name == new_variant_type.name:
# Check that the old and new version of each variant type is also compatible.
old = FieldCompatibility(old_variant_type, old_field.idl_file,
old_field.idl_file_path, old_field.unstable,

View File

@ -236,6 +236,7 @@ class GitException(Exception):
process_args: a list containing the git command and arguments (includes 'git' as its first
element) that were run, if any.
stderr: the error output of the git command.
"""
def __init__( # pylint: disable=too-many-arguments
@ -258,6 +259,7 @@ class GitCommandResult(object):
returncode: the return code.
stdout: the output of the command.
stderr: the error output of the command.
"""
def __init__( # pylint: disable=too-many-arguments

View File

@ -9,7 +9,11 @@ from typing import Any, Callable, List
def parallel_process(items, func):
# type: (List[Any], Callable[[Any], bool]) -> bool
"""Run a set of work items to completion and wait."""
"""
Run a set of work items to completion and wait.
:returns whether all tasks were successful.
"""
try:
cpus = cpu_count()
except NotImplementedError:
@ -17,20 +21,16 @@ def parallel_process(items, func):
task_queue = queue.Queue() # type: queue.Queue
# Use a list so that worker function will capture this variable
pp_event = threading.Event()
pp_result = [True]
pp_lock = threading.Lock()
has_failure_event = threading.Event()
def worker():
# type: () -> None
"""Worker thread to process work items in parallel."""
while not pp_event.is_set():
while True:
try:
item = task_queue.get_nowait()
except queue.Empty:
# if the queue is empty, exit the worker thread
pp_event.set()
return
try:
@ -39,13 +39,8 @@ def parallel_process(items, func):
# Tell the queue we finished with the item
task_queue.task_done()
# Return early if we fail, and signal we are done
if not ret:
with pp_lock:
pp_result[0] = False
pp_event.set()
return
has_failure_event.set()
# Enqueue all the work we want to process
for item in items:
@ -62,10 +57,10 @@ def parallel_process(items, func):
# Wait for the threads to finish
# Loop with a timeout so that we can process Ctrl-C interrupts
while not pp_event.wait(1):
while not queue.Empty:
time.sleep(1)
for thread in threads:
thread.join()
return pp_result[0]
return not has_failure_event.is_set()

View File

@ -11,7 +11,7 @@ class PyDocstyleLinter(base.LinterBase):
def __init__(self):
# type: () -> None
"""Create a pydocstyle linter."""
super(PyDocstyleLinter, self).__init__("pydocstyle", "2.1.1")
super(PyDocstyleLinter, self).__init__("pydocstyle", "6.1.1")
def get_lint_version_cmd_args(self):
# type: () -> List[str]

View File

@ -33,16 +33,26 @@ import os
def discover_modules(module_root, allowed_modules):
# pylint: disable=too-many-branches
"""Scan module_root for subdirectories that look like MongoDB modules.
Return a list of imported build.py module objects.
"""
found_modules = []
found_module_names = []
if allowed_modules is not None:
allowed_modules = allowed_modules.split(',')
# When `--modules=` is passed, the split on empty string is represented
# in memory as ['']
if allowed_modules == ['']:
allowed_modules = []
if not os.path.isdir(module_root):
if allowed_modules:
raise RuntimeError(
f"Requested the following modules: {allowed_modules}, but the module root '{module_root}' could not be found. Check the module root, or remove the module from the scons invocation."
)
return found_modules
for name in os.listdir(module_root):
@ -66,11 +76,17 @@ def discover_modules(module_root, allowed_modules):
if getattr(module, "name", None) is None:
module.name = name
found_modules.append(module)
found_module_names.append(name)
finally:
fp.close()
except (FileNotFoundError, IOError):
pass
if allowed_modules is not None:
missing_modules = set(allowed_modules) - set(found_module_names)
if missing_modules:
raise RuntimeError(f"Failed to locate all modules. Could not find: {missing_modules}")
return found_modules

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""Script and library for symbolizing MongoDB stack traces.
To use as a script, paste the JSON object on the line after ----- BEGIN BACKTRACE ----- into the
@ -24,20 +23,42 @@ import signal
import subprocess
import sys
import time
from abc import ABC, abstractmethod
from collections import OrderedDict
from datetime import timedelta
from pathlib import Path
from typing import Dict
from typing import Dict, List, Any, Union, Optional
import requests
# pylint: disable=wrong-import-position
# pylint: disable=too-many-branches
from tenacity import wait_fixed, stop_after_delay, retry_if_result, Retrying
sys.path.append(str(Path(os.getcwd(), __file__).parent.parent))
from buildscripts.util.oauth import Configs, get_oauth_credentials
from buildscripts.util.oauth import Configs, get_oauth_credentials, get_client_cred_oauth_credentials
from buildscripts.build_system_options import PathOptions
SYMBOLIZER_PATH_ENV = "MONGOSYMB_SYMBOLIZER_PATH"
# since older versions may have issues with symbolizing, we are setting the toolchain version to v4
DEFAULT_SYMBOLIZER_PATH = "/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
class PathDbgFileResolver(object):
class DbgFileResolver(ABC):
"""Base gdb path resolver class."""
@abstractmethod
def get_dbg_file(self, soinfo: Dict[str, Any]) -> Union[str, None]:
"""
To get path for given build info.
:param soinfo: soinfo as dict
:return: path as string or None (if path not found)
"""
raise NotImplementedError
class PathDbgFileResolver(DbgFileResolver):
"""PathDbgFileResolver class."""
def __init__(self, bin_path_guess):
@ -54,7 +75,7 @@ class PathDbgFileResolver(object):
return path if path else self._bin_path_guess
class S3BuildidDbgFileResolver(object):
class S3BuildidDbgFileResolver(DbgFileResolver):
"""S3BuildidDbgFileResolver class."""
def __init__(self, cache_dir, s3_bucket):
@ -73,7 +94,7 @@ class S3BuildidDbgFileResolver(object):
if not os.path.exists(build_id_path):
try:
self._get_from_s3(build_id)
except Exception: # pylint: disable=broad-except
except Exception: # noqa pylint: disable=broad-except
ex = sys.exc_info()[0]
sys.stderr.write("Failed to find debug symbols for {} in s3: {}\n".format(
build_id, ex))
@ -147,7 +168,7 @@ class CachedResults(object):
return self._cached_results.get(key)
class PathResolver(object):
class PathResolver(DbgFileResolver):
"""
Class to find path for given buildId.
@ -163,16 +184,17 @@ class PathResolver(object):
# This amount of attributes are necessary.
# the main (API) sever that we'll be sending requests to
default_host = 'https://symbolizer-service.server-tig.prod.corp.mongodb.com'
default_cache_dir = os.path.join(os.getcwd(), 'build', 'symbolizer_downloads_cache')
default_creds_file_path = os.path.join(os.getcwd(), '.symbolizer_credentials.json')
default_host = "https://symbolizer-service.server-tig.prod.corp.mongodb.com"
default_cache_dir = os.path.join(os.getcwd(), "build", "symbolizer_downloads_cache")
default_creds_file_path = os.path.join(os.getcwd(), ".symbolizer_credentials.json")
default_client_credentials_scope = "servertig-symbolizer-fullaccess"
default_client_credentials_user_name = "client-user"
download_timeout_secs = timedelta(minutes=4).total_seconds()
def __init__(self, host: str = None, cache_size: int = 0, cache_dir: str = None,
client_credentials_scope: str = None, client_credentials_user_name: str = None,
client_id: str = None, redirect_port: int = None, scope: str = None,
auth_domain: str = None):
client_id: str = None, client_secret: str = None, redirect_port: int = None,
scope: str = None, auth_domain: str = None):
"""
Initialize instance.
@ -187,6 +209,7 @@ class PathResolver(object):
self.client_credentials_scope = client_credentials_scope or self.default_client_credentials_scope
self.client_credentials_user_name = client_credentials_user_name or self.default_client_credentials_user_name
self.client_id = client_id
self.client_secret = client_secret
self.redirect_port = redirect_port
self.scope = scope
self.auth_domain = auth_domain
@ -212,11 +235,17 @@ class PathResolver(object):
data = json.loads(cfile.read())
access_token, expire_time = data.get("access_token"), data.get("expire_time")
if time.time() < expire_time:
# credentials hasn't expired yet
# credentials not expired yet
self.http_client.headers.update({"Authorization": f"Bearer {access_token}"})
return
credentials = get_oauth_credentials(configs=self.configs, print_auth_url=True)
if self.client_id and self.client_secret:
# auth using secrets
credentials = get_client_cred_oauth_credentials(self.client_id, self.client_secret,
self.configs)
else:
# since we don't have access to secrets, ask user to auth manually
credentials = get_oauth_credentials(configs=self.configs, print_auth_url=True)
self.http_client.headers.update({"Authorization": f"Bearer {credentials.access_token}"})
# write credentials to local file for further useage
@ -265,7 +294,7 @@ class PathResolver(object):
:param url: download URL
:return: full name for local file
"""
return url.split('/')[-1]
return url.split("/")[-1]
@staticmethod
def unpack(path: str) -> str:
@ -273,9 +302,9 @@ class PathResolver(object):
Use to utar/unzip files.
:param path: full path of file
:return: full path of directory of unpacked file
:return: full path to directory of unpacked file
"""
out_dir = path.replace('.tgz', '', 1)
out_dir = path.replace(".tgz", "", 1)
if not os.path.exists(out_dir):
os.mkdir(out_dir)
@ -296,12 +325,25 @@ class PathResolver(object):
filename = self.url_to_filename(url)
path = os.path.join(self.cache_dir, filename)
if not os.path.exists(path):
subprocess.check_call(['wget', url], cwd=self.cache_dir)
print("Downloading the file...")
self.get_file_from_service(url, path)
else:
print('File aready exists in cache')
print("File already exists in cache")
exists_locally = True
return path, exists_locally
def get_file_from_service(self, url: str, local_path: str) -> None:
"""
Get file from URL and write to a local file.
:param url: URL string
:param local_path: full name for local file
"""
with requests.get(url, stream=True, timeout=self.download_timeout_secs) as response:
with open(local_path, "wb") as file:
for chunk in response.iter_content(chunk_size=2 * 1024 * 1024):
file.write(chunk)
def get_dbg_file(self, soinfo: dict) -> str or None:
"""
To get path for given buildId.
@ -310,32 +352,26 @@ class PathResolver(object):
:return: path as string or None (if path not found)
"""
build_id = soinfo.get("buildId", "").lower()
binary_name = 'mongo'
version = soinfo.get("version")
binary_name = "mongo"
# search from cached results
path = self.get_from_cache(build_id)
if not path:
# path does not exist in cache, so we send request to server
try:
response = self.http_client.get(f'{self.host}/find_by_id',
params={'build_id': build_id})
search_parameters = {"build_id": build_id}
if version:
search_parameters["version"] = version
print(f"Getting data from service... Search parameters: {search_parameters}")
response = self.http_client.get(f"{self.host}/find_by_id", params=search_parameters)
if response.status_code != 200:
# if we could not find the path of binary, that might be system library.
# we can try using frame's own `path` data.
# symbolization can succeed only if that binary exists on local
# machine (more specifically: in the given path).
system_path = soinfo.get('path')
if system_path:
sys.stdout.write(
f"Could not find path of binary from symbolizer web service. Trying to use the "
f"provided path: {system_path}\n")
return system_path
sys.stderr.write(
f"Server returned unsuccessful status: {response.status_code}, "
f"response body: {response.text}\n")
return None
else:
data = response.json().get('data', {})
path, binary_name = data.get('debug_symbols_url'), data.get('file_name')
data = response.json().get("data", {})
path, binary_name = data.get("debug_symbols_url"), data.get("file_name")
except Exception as err: # noqa pylint: disable=broad-except
sys.stderr.write(f"Error occurred while trying to get response from server "
f"for buildId({build_id}): {err}\n")
@ -352,7 +388,7 @@ class PathResolver(object):
try:
dl_path, exists_locally = self.download(path)
if exists_locally:
path = dl_path.replace('.tgz', '', 1)
path = dl_path.replace(".tgz", "", 1)
else:
print("Downloaded, now unpacking...")
path = self.unpack(dl_path)
@ -362,8 +398,8 @@ class PathResolver(object):
# if file has extension, it is good. if not, we should append .debug, because those without extension are
# from release builds, and their debug symbol files contain .debug extension.
# we need to map those 2 different file names ('<name>' becomes '<name>.debug').
if not binary_name.endswith('.debug') and not binary_name.endswith('.so'):
binary_name = f'{binary_name}.debug'
if not binary_name.endswith(".debug"):
binary_name = f"{binary_name}.debug"
inner_folder_name = self.path_options.get_binary_folder_name(binary_name)
@ -381,6 +417,7 @@ def parse_input(trace_doc, dbg_path_resolver):
return {so_entry["b"]: so_entry for so_entry in somap_list if "b" in so_entry}
base_addr_map = make_base_addr_map(trace_doc["processInfo"]["somap"])
version = get_version(trace_doc)
frames = []
for frame in trace_doc["backtrace"]:
@ -390,6 +427,8 @@ def parse_input(trace_doc, dbg_path_resolver):
)
continue
soinfo = base_addr_map.get(frame["b"], {})
if version:
soinfo["version"] = version
elf_type = soinfo.get("elfType", 0)
if elf_type == 3:
addr_base = "0"
@ -399,7 +438,7 @@ def parse_input(trace_doc, dbg_path_resolver):
addr_base = soinfo.get("vmaddr", "0")
addr = int(addr_base, 16) + int(frame["o"], 16)
# addr currently points to the return address which is the one *after* the call. x86 is
# variable length so going backwards is difficult. However llvm-symbolizer seems to do the
# variable length so going backwards is difficult. However, llvm-symbolizer seems to do the
# right thing if we just subtract 1 byte here. This has the downside of also adjusting the
# address of instructions that cause signals (such as segfaults and divide-by-zero) which
# are already correct, but there doesn't seem to be a reliable way to detect that case.
@ -411,6 +450,16 @@ def parse_input(trace_doc, dbg_path_resolver):
return frames
def get_version(trace_doc: Dict[str, Any]) -> Optional[str]:
"""
Get version from trace doc.
:param trace_doc: Traceback dict.
:return: Version string or None.
"""
return trace_doc.get("processInfo", {}).get("mongodbVersion")
def symbolize_frames(trace_doc, dbg_path_resolver, symbolizer_path, dsym_hint, input_format,
**kwargs):
"""Return a list of symbolized stack frames from a trace_doc in MongoDB stack dump format."""
@ -418,24 +467,23 @@ def symbolize_frames(trace_doc, dbg_path_resolver, symbolizer_path, dsym_hint, i
# Keep frames in kwargs to avoid changing the function signature.
frames = kwargs.get("frames")
if frames is None:
frames = preprocess_frames(dbg_path_resolver, trace_doc, input_format)
total_seconds_for_retries = kwargs.get("total_seconds_for_retries", 0)
frames = preprocess_frames_with_retries(dbg_path_resolver, trace_doc, input_format,
total_seconds_for_retries)
if not symbolizer_path:
symbolizer_path_env = "MONGOSYMB_SYMBOLIZER_PATH"
default_symbolizer_path = "llvm-symbolizer"
symbolizer_path = os.environ.get(symbolizer_path_env)
symbolizer_path = os.environ.get(SYMBOLIZER_PATH_ENV)
if not symbolizer_path:
print(
f"Env value for '{symbolizer_path_env}' not found, using '{default_symbolizer_path}' "
f"as a defualt executable path.")
symbolizer_path = default_symbolizer_path
print(f"Env value for '{SYMBOLIZER_PATH_ENV}' not found, using"
f" '{DEFAULT_SYMBOLIZER_PATH}' as a default executable path.")
symbolizer_path = DEFAULT_SYMBOLIZER_PATH
symbolizer_args = [symbolizer_path]
for dh in dsym_hint:
symbolizer_args.append("-dsym-hint={}".format(dh))
symbolizer_process = subprocess.Popen(args=symbolizer_args, close_fds=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=open("/dev/null"))
stderr=sys.stdout)
def extract_symbols(stdin):
"""Extract symbol information from the output of llvm-symbolizer.
@ -467,7 +515,7 @@ def symbolize_frames(trace_doc, dbg_path_resolver, symbolizer_path, dsym_hint, i
for frame in frames:
if frame["path"] is None:
print("Path not found in frame:", frame)
print(f"Path not found in frame: {frame}")
continue
symbol_line = "CODE {path:} {addr:}\n".format(**frame)
symbolizer_process.stdin.write(symbol_line.encode())
@ -478,8 +526,17 @@ def symbolize_frames(trace_doc, dbg_path_resolver, symbolizer_path, dsym_hint, i
return frames
def preprocess_frames(dbg_path_resolver, trace_doc, input_format):
"""Process the paths in frame objects."""
def preprocess_frames(dbg_path_resolver: DbgFileResolver, trace_doc: Dict[str, Any],
input_format: str) -> List[Dict[str, Any]]:
"""
Process the paths in frame objects.
:param dbg_path_resolver: debug symbols file path resolver
:param trace_doc: traceback object
:param input_format: format of input
:return: the list of traceback frames
"""
if input_format == "classic":
frames = parse_input(trace_doc, dbg_path_resolver)
elif input_format == "thin":
@ -488,9 +545,43 @@ def preprocess_frames(dbg_path_resolver, trace_doc, input_format):
frame["path"] = dbg_path_resolver.get_dbg_file(frame)
else:
raise ValueError('Unknown input format "{}"'.format(input_format))
return frames
def has_high_not_found_paths_ratio(frames: List[Dict[str, Any]]) -> bool:
"""
Check whether not found paths in frames ratio is higher than 0.5.
:param frames: the list of traceback frames
:return: True if ratio is higher than 0.5
"""
not_found = [1 for f in frames if f.get("path") is None]
not_found_ratio = len(not_found) / (len(frames) or 1)
return not_found_ratio >= 0.5
def preprocess_frames_with_retries(dbg_path_resolver: DbgFileResolver, trace_doc: Dict[str, Any],
input_format: str,
total_seconds_for_retries: int = 0) -> List[Dict[str, Any]]:
"""
Process the paths in frame objects.
:param dbg_path_resolver: debug symbols file path resolver
:param trace_doc: traceback object
:param input_format: format of input
:param total_seconds_for_retries: max wait time for retries in seconds
:return: the list of traceback frames
"""
retrying = Retrying(
retry=retry_if_result(has_high_not_found_paths_ratio), wait=wait_fixed(60),
stop=stop_after_delay(total_seconds_for_retries),
retry_error_callback=lambda retry_state: retry_state.outcome.result())
return retrying(preprocess_frames, dbg_path_resolver, trace_doc, input_format)
def classic_output(frames, outfile, **kwargs): # pylint: disable=unused-argument
"""Provide classic output."""
for frame in frames:
@ -516,6 +607,12 @@ def make_argument_parser(parser=None, **kwargs):
parser.add_argument('--debug-file-resolver', choices=['path', 's3', 'pr'], default='pr')
parser.add_argument('--src-dir-to-move', action="store", type=str, default=None,
help="Specify a src dir to move to /data/mci/{original_buildid}/src")
parser.add_argument(
'--total-seconds-for-retries', default=0, type=int,
help="If web service fails to find path for given build id, it could be because mapping "
"process was not finished yet. We can wait for it to finish and retry again. Each retry"
" adds 2 minutes to previous wait time. It is guaranteed that total wait time does not exceed this "
"specified amount.")
parser.add_argument('--live', action='store_true')
s3_group = parser.add_argument_group(
@ -531,6 +628,8 @@ def make_argument_parser(parser=None, **kwargs):
help='URL of web service running the API to get debug symbol URL')
pr_group.add_argument('--pr-cache-dir', default='',
help='Full path to a directory to store cache/files')
pr_group.add_argument('--client-secret', default='', help='Secret key for Okta Oauth')
pr_group.add_argument('--client-id', default='', help='Client id for Okta Oauth')
# caching mechanism is currently not fully developed and needs more advanced cleaning techniques, we add an option
# to enable it after completing the implementation
@ -565,11 +664,17 @@ def substitute_stdin(options, resolver):
if not trace_doc["backtrace"]:
print("Trace is empty, skipping...")
continue
frames = symbolize_frames(trace_doc, resolver, options.symbolizer_path, [],
options.output_format)
frames = symbolize_frames(
trace_doc,
resolver,
options.symbolizer_path,
[],
options.output_format,
)
print(prefix)
print("Symbolizing...")
classic_output(frames, sys.stdout, indent=2)
print("Completed, waiting for input...")
else:
print(line)
@ -583,7 +688,8 @@ def main(options):
elif options.debug_file_resolver == 's3':
resolver = S3BuildidDbgFileResolver(options.s3_cache_dir, options.s3_bucket)
elif options.debug_file_resolver == 'pr':
resolver = PathResolver(host=options.pr_host, cache_dir=options.pr_cache_dir)
resolver = PathResolver(host=options.pr_host, cache_dir=options.pr_cache_dir,
client_secret=options.client_secret, client_id=options.client_id)
if options.live:
print("Entering live mode")
@ -597,7 +703,7 @@ def main(options):
if not trace_doc or not trace_doc.strip():
print("Please provide the backtrace through stdin for symbolization;"
"e.g. `your/symbolization/command < /file/with/stacktrace`")
" e.g. `your/symbolization/command < /file/with/stacktrace`")
# Search the trace_doc for an object having "backtrace" and "processInfo" keys.
def bt_search(obj):
@ -624,8 +730,8 @@ def main(options):
except json.JSONDecodeError:
pass
else:
print("could not find json backtrace object in input", file=sys.stderr)
exit(1)
sys.stderr.write("could not find json backtrace object in input\n")
sys.exit(1)
output_fn = None
if options.output_format == 'json':
@ -633,7 +739,8 @@ def main(options):
if options.output_format == 'classic':
output_fn = classic_output
frames = preprocess_frames(resolver, trace_doc, options.input_format)
frames = preprocess_frames_with_retries(resolver, trace_doc, options.input_format,
options.total_seconds_for_retries)
if options.src_dir_to_move and resolver.mci_build_dir is not None:
try:

View File

@ -41,21 +41,6 @@ platforms:
instance_type: c6g.medium
transport:
username: ec2-user
- name: debian71-x86-64
driver:
image_id: ami-4b124a22
transport:
username: admin
- name: debian81-x86-64
driver:
image_id: ami-896d85e2
transport:
username: admin
- name: debian92-x86-64
driver:
image_id: ami-71b7750b
transport:
username: admin
- name: debian10-x86-64
driver:
image_id: ami-0dedf6a6502877301

View File

@ -23,7 +23,7 @@ provisioner:
name: chef_zero
log_level: info
product_name: cinc
product_version: 16.7.61
product_version: 17.9.52
download_url: https://omnitruck.cinc.sh/install.sh
platforms:
@ -34,7 +34,7 @@ platforms:
username: ec2-user
- name: amazon2-x86-64
driver:
image_id: ami-428aa838
image_id: ami-02013ed1a71752ea7
transport:
username: ec2-user
- name: amazon2-arm64
@ -53,11 +53,6 @@ platforms:
image_id: ami-896d85e2
transport:
username: admin
- name: debian92-x86-64
driver:
image_id: ami-71b7750b
transport:
username: admin
- name: debian10-x86-64
driver:
image_id: ami-0dedf6a6502877301
@ -70,7 +65,7 @@ platforms:
username: admin
- name: rhel70-x86-64
driver:
image_id: ami-2051294a
image_id: ami-0051b1b2c5a166c8c
transport:
username: root
- name: rhel80-x86-64
@ -84,6 +79,12 @@ platforms:
instance_type: m6g.medium
transport:
username: ec2-user
- name: rhel90-x86-64
driver:
image_id: ami-0c41531b8d18cc72b
user_data: rhel-user-data.sh
transport:
username: ec2-user
- name: suse11-x86-64
driver:
image_id: ami-7f2e6015
@ -132,6 +133,19 @@ platforms:
driver:
image_id: ami-00579fbb15b954340
instance_type: m6g.medium
- name: ubuntu2204-x86-64
driver:
image_id: ami-051dcca84f1edfff1
user_data: ubuntu-user-data.sh
transport:
username: ubuntu
- name: ubuntu2204-arm64
driver:
image_id: ami-070650c005cce4203
instance_type: m6g.medium
user_data: ubuntu-user-data.sh
transport:
username: ubuntu
transport:
ssh_key: ~/.ssh/kitchen.pem

View File

@ -51,11 +51,21 @@ if platform_family? 'debian'
ENV['DEBIAN_FRONTEND'] = 'noninteractive'
package 'openssl'
# the ubuntu 16.04 image does not have some dependencies installed by default
# the ubuntu image does not have some dependencies installed by default
# and it is required for the install_compass script
execute 'install dependencies' do
command 'apt-get install -y python libsasl2-modules-gssapi-mit'
live_stream true
if node['platform'] == 'ubuntu' and node['platform_version'] >= '20.04'
execute 'install dependencies ubuntu 20.04' do
command 'apt-get install -y python3 libsasl2-modules-gssapi-mit'
live_stream true
end
link '/usr/bin/python' do
to '/usr/bin/python3'
end
else
execute 'install dependencies' do
command 'apt-get install -y python libsasl2-modules-gssapi-mit'
live_stream true
end
end
# dpkg returns 1 if dependencies are not satisfied, which they will not be
@ -82,12 +92,6 @@ if platform_family? 'debian'
command 'apt update && apt -y -f install'
live_stream true
end
execute 'install mongo shell' do
command 'dpkg -i `find . -name "*shell*.deb"`'
live_stream true
cwd homedir
end
end
if platform_family? 'rhel' or platform_family? 'amazon'
@ -96,6 +100,14 @@ if platform_family? 'rhel' or platform_family? 'amazon'
sleep 120
EOH
end
#rhel9 doesn't have Gconf2 without epel
if node['platform'] == 'redhat' and node['platform_version'] == '9.0'
execute 'install epel' do
command 'dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y'
live_stream true
cwd homedir
end
end
execute 'install mongod' do
command 'yum install -y `find . -name "*server*.rpm"`'
live_stream true
@ -108,12 +120,6 @@ if platform_family? 'rhel' or platform_family? 'amazon'
live_stream true
cwd homedir
end
execute 'install mongo shell' do
command 'yum install -y `find . -name "*shell*.rpm"`'
live_stream true
cwd homedir
end
end
if platform_family? 'suse'
@ -145,32 +151,4 @@ if platform_family? 'suse'
live_stream true
cwd homedir
end
execute 'install mongo' do
command 'zypper --no-gpg-checks -n install `find . -name "*shell*.rpm"`'
live_stream true
cwd homedir
end
end
inspec_wait = <<HEREDOC
#!/bin/bash -x
ulimit -v unlimited
for i in {1..60}
do
mongo --eval "db.smoke.insert({answer: 42})"
if [ $? -eq 0 ]
then
exit 0
else
echo "sleeping"
sleep 1
fi
done
exit 1
HEREDOC
file '/inspec_wait.sh' do
content inspec_wait
mode '0755'
end

View File

@ -0,0 +1,6 @@
#! /bin/bash
sed -i '/^PubkeyAcceptedAlgorithms/s/$/,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config
sed -i '/^HostKeyAlgorithms/s/$/,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config
update-crypto-policies --set LEGACY
systemctl restart sshd

View File

@ -78,11 +78,6 @@ else
end
end
# wait to make sure mongod is ready
describe command("/inspec_wait.sh") do
its('exit_status') { should eq 0 }
end
############################################################
# This section verifies files, directories, and users
# - files and directories exist and have correct attributes
@ -169,8 +164,7 @@ if deb
# account shells
its('shell') {
if ((os[:name] == 'debian' and os[:release].split('.')[0] >= '10') or
(os[:name] == 'ubuntu' and os[:release] == '18.04') or
(os[:name] == 'ubuntu' and os[:release] == '20.04'))
(os[:name] == 'ubuntu' and os[:release] >= '18.04'))
should eq '/usr/sbin/nologin'
else
should eq '/bin/false'
@ -199,23 +193,6 @@ ulimits.each do |limit, value|
end
end
############################################################
# This section verifies reads and writes.
# - insert a document into the database
# - verify that findOne() returns a matching document
############################################################
describe command('sh -c "ulimit -v unlimited && mongo --eval \"db.smoke.insert({answer: 42})\""') do
its('exit_status') { should eq 0 }
its('stdout') { should match(/.+WriteResult\({ "nInserted" : 1 }\).+/m) }
end
# read a document from the db
describe command('sh -c "ulimit -v unlimited && mongo --eval \"db.smoke.findOne()\""') do
its('exit_status') { should eq 0 }
its('stdout') { should match(/.+"answer" : 42.+/m) }
end
############################################################
# This section verifies uninstall.
############################################################

View File

@ -0,0 +1,7 @@
#! /bin/bash
echo "HostkeyAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config
echo "PubkeyAcceptedAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config
systemctl restart sshd
touch /root/userdata_ran

View File

@ -302,6 +302,8 @@ class Distro(object):
return "bionic"
elif build_os == 'ubuntu2004':
return "focal"
elif build_os == 'ubuntu2204':
return "jammy"
else:
raise Exception("unsupported build_os: %s" % build_os)
elif self.dname == 'debian':
@ -341,7 +343,17 @@ class Distro(object):
if re.search("(suse)", self.dname):
return ["suse11", "suse12", "suse15"]
elif re.search("(redhat|fedora|centos)", self.dname):
return ["rhel82", "rhel80", "rhel70", "rhel71", "rhel72", "rhel62", "rhel55", "rhel67"]
return [
"rhel90",
"rhel82",
"rhel80",
"rhel70",
"rhel71",
"rhel72",
"rhel62",
"rhel55",
"rhel67",
]
elif self.dname in ['amazon', 'amazon2']:
return [self.dname]
elif self.dname == 'ubuntu':
@ -351,6 +363,7 @@ class Distro(object):
"ubuntu1604",
"ubuntu1804",
"ubuntu2004",
"ubuntu2204",
]
elif self.dname == 'debian':
return ["debian81", "debian92", "debian10", "debian11"]

View File

@ -119,7 +119,7 @@ class EnterpriseDistro(packager.Distro):
def build_os(self, arch): # pylint: disable=too-many-branches
"""Return the build os label in the binary package to download.
The labels "rhel57", "rhel62", "rhel67", "rhel70", "rhel80" are for redhat,
The labels "rhel57", "rhel62", "rhel67", "rhel70", "rhel80", "rhel90" are for redhat,
the others are delegated to the super class.
"""
# pylint: disable=too-many-return-statements
@ -139,7 +139,7 @@ class EnterpriseDistro(packager.Distro):
return []
if arch == "arm64":
if self.dname == 'ubuntu':
return ["ubuntu1804", "ubuntu2004"]
return ["ubuntu1804", "ubuntu2004", "ubuntu2204"]
if arch == "aarch64":
if self.dname == 'redhat':
return ["rhel82"]
@ -148,7 +148,7 @@ class EnterpriseDistro(packager.Distro):
return []
if re.search("(redhat|fedora|centos)", self.dname):
return ["rhel80", "rhel70", "rhel62", "rhel57"]
return ["rhel90", "rhel80", "rhel70", "rhel62", "rhel57"]
return super(EnterpriseDistro, self).build_os(arch)
# pylint: enable=too-many-return-statements

View File

@ -3,7 +3,6 @@
import json
import sys
from collections import namedtuple
from datetime import datetime, timedelta
from statistics import mean
from typing import Dict, List
@ -13,7 +12,8 @@ import structlog
from buildscripts.resmokelib.testing.report import TestInfo, TestReport
from buildscripts.resmokelib.utils import get_task_name_without_suffix
from buildscripts.util.cmdutils import enable_logging
from evergreen import RetryingEvergreenApi, TestStats
from buildscripts.util.teststats import HistoricTaskData, HistoricalTestInformation
LOGGER = structlog.get_logger("buildscripts.resmoke_tests_runtime_validate")
@ -34,17 +34,12 @@ def parse_resmoke_report(report_file: str) -> List[TestInfo]:
return [test_info for test_info in test_report.test_infos if "jstests" in test_info.test_file]
def get_historic_stats(evg_api_config: str, project_id: str, test_files: List[str], task_name: str,
build_variant: str) -> List[TestStats]:
def get_historic_stats(project_id: str, task_name: str,
build_variant: str) -> List[HistoricalTestInformation]:
"""Get historic test stats."""
evg_api = RetryingEvergreenApi.get_api(config_file=evg_api_config)
before_date = datetime.today()
after_date = before_date - timedelta(days=LOOK_BACK_NUM_DAYS)
base_task_name = get_task_name_without_suffix(task_name, build_variant).replace(
BURN_IN_PREFIX, "")
return evg_api.test_stats_by_project(project_id=project_id, after_date=after_date,
before_date=before_date, tests=test_files,
tasks=[base_task_name], variants=[build_variant])
return HistoricTaskData.get_stats_from_s3(project_id, base_task_name, build_variant)
def make_stats_map(stats: List[_TestData]) -> Dict[str, List[float]]:
@ -63,13 +58,10 @@ def make_stats_map(stats: List[_TestData]) -> Dict[str, List[float]]:
@click.command()
@click.option("--resmoke-report-file", type=str, required=True,
help="Location of resmoke's report JSON file.")
@click.option("--evg-api-config", type=str, required=True,
help="Location of evergreen api configuration.")
@click.option("--project-id", type=str, required=True, help="Evergreen project id.")
@click.option("--build-variant", type=str, required=True, help="Evergreen build variant name.")
@click.option("--task-name", type=str, required=True, help="Evergreen task name.")
def main(resmoke_report_file: str, evg_api_config: str, project_id: str, build_variant: str,
task_name: str) -> None:
def main(resmoke_report_file: str, project_id: str, build_variant: str, task_name: str) -> None:
"""Compare resmoke tests runtime with historic stats."""
enable_logging(verbose=False)
@ -79,10 +71,9 @@ def main(resmoke_report_file: str, evg_api_config: str, project_id: str, build_v
for test_info in current_test_infos
])
historic_stats = get_historic_stats(evg_api_config, project_id, list(current_stats_map.keys()),
task_name, build_variant)
historic_stats = get_historic_stats(project_id, task_name, build_variant)
historic_stats_map = make_stats_map([
_TestData(test_stats.test_file, test_stats.avg_duration_pass)
_TestData(test_stats.test_name, test_stats.avg_duration_pass)
for test_stats in historic_stats
])

View File

@ -8,3 +8,8 @@
# Disable featureFlagRequireTenantID until all paths pass tenant id to TenantNamespace
# and TenantDatabase constructors.
- featureFlagRequireTenantID
- featureFlagSbePlanCache
# This flag exists to help users in managed environments that upgraded to 6.0 before 6.0.0-rc8 was
# released create the transactions collection index and is only meant to be enabled adhoc, so only
# its targeted tests should enable it.
- featureFlagAlwaysCreateConfigTransactionsPartialIndexOnStepUp

View File

@ -53,6 +53,8 @@
# Inserts enough data that recovery takes more than 8 seconds, so we never get a working primary.
- jstests/core/geo_s2ordering.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/**/*.js
- name: reconfig_kill_primary_jscore_passthrough_exclude_files
@ -121,6 +123,8 @@
# Inserts enough data that recovery takes more than 8 seconds, so we never get a working primary.
- jstests/core/geo_s2ordering.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/**/*.js
- name: kill_primary_jscore_passthrough_exclude_with_any_tags

View File

@ -190,16 +190,6 @@ evergreen_buildvariants:
platform: suse15
architecture: x86_64
- name: debian92
edition: targeted
platform: debian92
architecture: x86_64
- name: enterprise-debian92-64
edition: enterprise
platform: debian92
architecture: x86_64
- name: debian10
edition: targeted
platform: debian10

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests are run in causally_consistent_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js

View File

@ -12,6 +12,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
- jstests/core/txns/**/*.js
# Skip any tests that run with auth explicitly.

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Only the first command in a transaction allows readConcern and this suite only tests
# non-transaction snapshot reads.

View File

@ -4,6 +4,8 @@ test_kind: multi_stmt_txn_passthrough
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests run in the jscore_txn passthrough suites.
- jstests/core/txns/**/*.js
@ -147,7 +149,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -3,6 +3,9 @@ test_kind: js_test
selector:
roots:
- jstests/change_streams/**/*.js
exclude_files:
# Expects a change stream cursor to be open on each of 2 shards.
- jstests/change_streams/projection_fakes_internal_event.js
exclude_with_any_tags:
##
# The next tags correspond to the special errors thrown by the

View File

@ -5,6 +5,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Assumes the _id index is real.

View File

@ -31,6 +31,8 @@ selector:
- uses_write_concern
# Sharding is not supported for live exports and imports.
- requires_sharding
# Workloads that kill random sessions may interrupt the export/import commands.
- kills_random_sessions
executor:
config:

View File

@ -23,6 +23,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled due to MongoDB restrictions and/or workload restrictions

View File

@ -23,6 +23,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled due to MongoDB restrictions and/or workload restrictions

View File

@ -23,6 +23,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled due to MongoDB restrictions and/or workload restrictions

View File

@ -28,6 +28,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled because MapReduce can lose cursors if the primary goes down during the operation.

View File

@ -28,6 +28,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled because MapReduce can lose cursors if the primary goes down during the operation.

View File

@ -23,6 +23,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled due to MongoDB restrictions and/or workload restrictions
@ -129,6 +130,12 @@ selector:
# for dbCheck. TODO (SERVER-63951): Remove this exclusion.
- jstests/concurrency/fsm_workloads/create_collection_and_view.js
# This suite runs the RunDBCheckInBackground hook and the dbCheck command generates oplog entries
# but those oplog entries are not supported by resharding.
# TODO (SERVER-66011): Enable internal_transactions_resharding.js in the
# concurrency_sharded_multi_stmt_txn_with_balancer suite
- jstests/concurrency/fsm_workloads/internal_transactions_resharding.js
exclude_with_any_tags:
- assumes_balancer_off

View File

@ -28,6 +28,7 @@ selector:
# $lookup and $graphLookup are not supported on sharded collections with transactions.
- jstests/concurrency/fsm_workloads/agg_graph_lookup.js
- jstests/concurrency/fsm_workloads/agg_lookup.js
- jstests/concurrency/fsm_workloads/view_catalog_cycle_lookup.js
# Disabled due to MongoDB restrictions and/or workload restrictions

View File

@ -32,11 +32,6 @@ selector:
# TODO: SERVER-39939.
- jstests/concurrency/fsm_workloads/snapshot_read_kill_operations.js
# This workload kills random sessions and a different FSM workload wouldn't be able to handle
# the error response from the op being killed.
- jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_simple_kill_sessions.js
# This workload may restart running transactions on a different client, causing deadlock if
# there is a concurrent dropDatabase waiting for the global X lock.
# TODO: SERVER-37876
@ -54,8 +49,13 @@ selector:
- jstests/concurrency/fsm_workloads/reindex_background.js
- jstests/concurrency/fsm_workloads/reindex_writeconflict.js
# This workload involves upgrading and downgrading the FCV, and can cause failure on other
# FSM workloads which depend on features which are only available in the latest FCV.
- jstests/concurrency/fsm_workloads/internal_transactions_setFCV.js
exclude_with_any_tags:
- requires_sharding
- kills_random_sessions
group_size: 10
group_count_multiplier: 1.0

View File

@ -32,11 +32,6 @@ selector:
# TODO: SERVER-39939.
- jstests/concurrency/fsm_workloads/snapshot_read_kill_operations.js
# This workload kills random sessions and a different FSM workload wouldn't be able to handle
# the error response from the op being killed.
- jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_simple_kill_sessions.js
# This workload may restart running transactions on a different client, causing deadlock if
# there is a concurrent dropDatabase waiting for the global X lock.
# TODO: SERVER-37876
@ -59,8 +54,13 @@ selector:
- jstests/concurrency/fsm_workloads/reindex_background.js
- jstests/concurrency/fsm_workloads/reindex_writeconflict.js
# This workload involves upgrading and downgrading the FCV, and can cause failure on other
# FSM workloads which depend on features which are only available in the latest FCV.
- jstests/concurrency/fsm_workloads/internal_transactions_setFCV.js
exclude_with_any_tags:
- requires_sharding
- kills_random_sessions
group_size: 10
group_count_multiplier: 1.0

View File

@ -32,11 +32,6 @@ selector:
# TODO: SERVER-39939.
- jstests/concurrency/fsm_workloads/snapshot_read_kill_operations.js
# This workload kills random sessions and a different FSM workload wouldn't be able to handle
# the error response from the op being killed.
- jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_simple_kill_sessions.js
# This workload may restart running transactions on a different client, causing deadlock if
# there is a concurrent dropDatabase waiting for the global X lock.
# TODO: SERVER-37876
@ -60,8 +55,13 @@ selector:
- jstests/concurrency/fsm_workloads/reindex.js
- jstests/concurrency/fsm_workloads/reindex_background.js
# This workload involves upgrading and downgrading the FCV, and can cause failure on other
# FSM workloads which depend on features which are only available in the latest FCV.
- jstests/concurrency/fsm_workloads/internal_transactions_setFCV.js
exclude_with_any_tags:
- requires_sharding
- kills_random_sessions
group_size: 10
group_count_multiplier: 1.0

View File

@ -6,6 +6,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
- jstests/core_standalone/**/*.js
exclude_files:
# Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the
@ -254,9 +256,6 @@ selector:
- jstests/core/index_check6.js
- jstests/core/index_check7.js
- jstests/core/index_decimal.js
- jstests/core/index_elemmatch1.js
- jstests/core/index_elemmatch2.js
- jstests/core/index_elemmatch2.js
- jstests/core/index_filter_commands.js
- jstests/core/index_filter_on_hidden_index.js
- jstests/core/index_multiple_compatibility.js
@ -506,8 +505,6 @@ selector:
- jstests/core/in7.js
- jstests/core/index13.js
- jstests/core/index_check2.js
- jstests/core/index_elemmatch1.js
- jstests/core/index_elemmatch2.js
- jstests/core/indexl.js
- jstests/core/json_schema/misc_validation.js
- jstests/core/ne_array.js
@ -756,7 +753,6 @@ selector:
- jstests/core/geonear_key.js
- jstests/core/getmore_invalidated_documents.js
- jstests/core/hidden_index.js
- jstests/core/index_elemmatch2.js
- jstests/core/index_partial_2dsphere.js
- jstests/core/json_schema/misc_validation.js
- jstests/core/list_collections_filter.js

View File

@ -6,6 +6,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Transactions only a readConcern argument on the first command.
- jstests/core/txns/**/*.js

View File

@ -0,0 +1,32 @@
test_kind: js_test
selector:
roots:
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
- src/mongo/db/modules/*/jstests/fle2/query/*.js
exclude_with_any_tags:
# Not compatible with tests the expect fle to always using $in in queries,
# i.e. verify explain output
- requires_fle_in_always
executor:
archive:
hooks:
- ValidateCollections
config:
shell_options:
eval: "testingReplication = true; testingFLESharding = false;"
hooks:
# We don't execute dbHash or oplog consistency checks since there is only a single replica set
# node.
- class: ValidateCollections
- class: CleanEveryN
n: 20
fixture:
class: ReplicaSetFixture
mongod_options:
set_parameters:
enableTestCommands: 1
internalQueryFLEAlwaysUseHighCardinalityMode: 1
# Use a 2-node replica set.
num_nodes: 2

View File

@ -0,0 +1,37 @@
test_kind: js_test
selector:
roots:
- jstests/fle2/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
- src/mongo/db/modules/*/jstests/fle2/query/*.js
exclude_with_any_tags:
# Not compatible with tests the expect fle to always using $in in queries,
# i.e. verify explain output
- requires_fle_in_always
executor:
archive:
hooks:
- CheckReplDBHash
- ValidateCollections
config:
shell_options:
eval: "testingReplication = false; testingFLESharding = true;"
hooks:
- class: CheckReplDBHash
- class: ValidateCollections
- class: CleanEveryN
n: 20
fixture:
class: ShardedClusterFixture
mongos_options:
set_parameters:
enableTestCommands: 1
internalQueryFLEAlwaysUseHighCardinalityMode: 1
mongod_options:
set_parameters:
enableTestCommands: 1
internalQueryFLEAlwaysUseHighCardinalityMode: 1
num_rs_nodes_per_shard: 2
enable_sharding:
- test

View File

@ -20,7 +20,6 @@ executor:
TestData:
skipValidationOnInvalidViewDefinitions: true
skipValidationOnNamespaceNotFound: false
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: MongoDFixture
mongod_options:

View File

@ -24,7 +24,6 @@ executor:
TestData:
skipValidationOnInvalidViewDefinitions: true
skipValidationOnNamespaceNotFound: false
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: MongoDFixture
mongod_options:

View File

@ -34,7 +34,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ReplicaSetFixture
mongod_options:

View File

@ -34,7 +34,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ReplicaSetFixture
mongod_options:

View File

@ -32,7 +32,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ReplicaSetFixture
mongod_options:

View File

@ -31,7 +31,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ReplicaSetFixture
mongod_options:

View File

@ -26,7 +26,6 @@ executor:
TestData:
skipValidationOnInvalidViewDefinitions: true
skipValidationOnNamespaceNotFound: false
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ReplicaSetFixture
mongod_options:

View File

@ -29,7 +29,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ShardedClusterFixture
mongos_options:

View File

@ -29,7 +29,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ShardedClusterFixture
mongos_options:

View File

@ -35,7 +35,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ShardedClusterFixture
mongos_options:

View File

@ -26,7 +26,6 @@ executor:
global_vars:
TestData:
skipValidationOnInvalidViewDefinitions: true
forceValidationWithFeatureCompatibilityVersion: latestFCV
fixture:
class: ShardedClusterFixture
mongos_options:

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
# command multiple times, which may observe the change to the "transactionLifetimeLimitSeconds"
@ -12,7 +14,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# The awaitdata_getmore_cmd.js test tails the oplog and waits for the getMore batch size to equal
# zero. The CheckReplDBHashInBackground hook consistently runs and creates sessions. At the same

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
# command multiple times, which may observe the change to the "transactionLifetimeLimitSeconds"
@ -12,7 +14,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# The awaitdata_getmore_cmd.js test tails the oplog and waits for the getMore batch size to equal
# zero. The CheckReplDBHashInBackground hook consistently runs and creates sessions. At the same

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
# command multiple times, which may observe the change to the "transactionLifetimeLimitSeconds"
@ -12,7 +14,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# The awaitdata_getmore_cmd.js test tails the oplog and waits for the getMore batch size to equal
# zero. The CheckReplDBHashInBackground hook consistently runs and creates sessions. At the same

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
# command multiple times, which may observe the change to the "transactionLifetimeLimitSeconds"
@ -12,7 +14,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# The awaitdata_getmore_cmd.js test tails the oplog and waits for the getMore batch size to equal
# zero. The CheckReplDBHashInBackground hook consistently runs and creates sessions. At the same

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
@ -55,7 +57,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# TODO: Remove after fixing SERVER-29449. executionStats.nReturned is incorrect for sharded
# queries with a limit or for distinct commands.

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
@ -55,7 +57,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# TODO: Remove after fixing SERVER-29449. executionStats.nReturned is incorrect for sharded
# queries with a limit or for distinct commands.

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
@ -55,7 +57,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# TODO: Remove after fixing SERVER-29449. executionStats.nReturned is incorrect for sharded
# queries with a limit or for distinct commands.

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
@ -55,7 +57,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# TODO: Remove after fixing SERVER-29449. executionStats.nReturned is incorrect for sharded
# queries with a limit or for distinct commands.

View File

@ -13,7 +13,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# These tests verify that an expected number of update operations were tracked in the server
# status metrics, but the logical session cache refresh causes additional updates to be recorded.

View File

@ -13,7 +13,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# These tests verify that an expected number of update operations were tracked in the server
# status metrics, but the logical session cache refresh causes additional updates to be recorded.

View File

@ -13,7 +13,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# These tests verify that an expected number of update operations were tracked in the server
# status metrics, but the logical session cache refresh causes additional updates to be recorded.

View File

@ -13,7 +13,6 @@ selector:
# can be triggered deterministically.
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# These tests verify that an expected number of update operations were tracked in the server
# status metrics, but the logical session cache refresh causes additional updates to be recorded.

View File

@ -151,7 +151,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -146,7 +146,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -147,7 +147,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -159,7 +159,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Transactions only a readConcern argument on the first command.
- jstests/core/txns/**/*.js

View File

@ -5,6 +5,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# This test initiates a txn with API parameters, but runs txn-continuing commands in a separate
# Thread object. Since those commands will not have API parameters appended, they will fail due

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Tests that query the system.profile collection cannot run in this suite since an initial sync
# may insert unexpected operations into the profile collection.

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Tests that query the system.profile collection cannot run in this suite since an initial sync
# may insert unexpected operations into the profile collection.

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Duplicate namespace may cause cloner to try and clone view instead of collection
- jstests/core/views/duplicate_ns.js

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests change the transactionLifetimeLimitSeconds server parameter which conflicts with how
# the CheckReplDBHashInBackground hook doesn't want transactions to be reaped while it is running.

View File

@ -96,7 +96,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $indexStats

View File

@ -87,7 +87,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -86,7 +86,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -84,7 +84,6 @@ selector:
# $listSessions
- jstests/core/list_all_local_sessions.js
- jstests/core/list_all_sessions.js
- jstests/core/list_local_sessions.js
- jstests/core/list_sessions.js
# $collStats

View File

@ -7,6 +7,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# Transactions do not support retryability of individual operations.
# TODO: Remove this once it is supported (SERVER-33952).

View File

@ -3,6 +3,8 @@ test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/*.js
exclude_files:
# These tests change the transactionLifetimeLimitSeconds server parameter which conflicts with how
# the CheckReplDBHashInBackground hook doesn't want transactions to be reaped while it is running.

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