diff --git a/buildscripts/resmokeconfig/suites/cst_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/cst_jscore_passthrough.yml old mode 100755 new mode 100644 diff --git a/buildscripts/resmokeconfig/suites/v1index_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/v1index_jscore_passthrough.yml new file mode 100644 index 00000000000..74ea20e76a0 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/v1index_jscore_passthrough.yml @@ -0,0 +1,61 @@ +# Test indexes with an override to create v:1 indexes by default. +# Based on replica_sets_jscore_passthrough.yml. +test_kind: js_test + +selector: + roots: + - jstests/core/**/*.js + exclude_files: + # v:1 index does not support NumberDecimal. + - jstests/core/index/index_decimal.js + - jstests/core/query/distinct/distinct_semantics.js + - jstests/core/query/double_decimal_compare.js + - jstests/core/query/nan.js + # v:1 index does not support wildcard. + - jstests/core/index/wildcard/**/*.js + # v:1 index does not support collation. + - jstests/core/collation.js + - jstests/core/query/expr/expr_index_use.js + # Timeseries collections are clustered, which use v:2 indexes. + - jstests/core/timeseries/**/*.js + # Excluded by replica_sets_jscore_passthrough + - jstests/core/txns/abort_expired_transaction.js + - jstests/core/txns/abort_transaction_thread_does_not_block_on_locks.js + - jstests/core/txns/kill_op_on_txn_expiry.js + - jstests/core/**/set_param1.js + - jstests/core/query/awaitdata_getmore_cmd.js + - jstests/core/administrative/current_op/currentop.js + - jstests/core/fsync.js + - jstests/core/txns/prepare_conflict.js + exclude_with_any_tags: + - assumes_standalone_mongod + - requires_profiling +executor: + archive: + hooks: + - RunDBCheckInBackground + - CheckReplDBHashInBackground + - ValidateCollectionsInBackground + - CheckReplDBHash + - CheckReplOplogs + - ValidateCollections + config: + shell_options: + eval: >- + globalThis.testingReplication = true; + await import("jstests/libs/override_methods/create_v1_index.js"); + hooks: + - class: RunDBCheckInBackground + - class: CheckReplDBHashInBackground + - class: ValidateCollectionsInBackground + - class: CheckReplOplogs + - class: CheckReplDBHash + - class: ValidateCollections + - class: CleanEveryN + n: 20 + fixture: + class: ReplicaSetFixture + mongod_options: + set_parameters: + enableTestCommands: 1 + num_nodes: 2 diff --git a/docs/poetry_execution.md b/docs/poetry_execution.md index 40d7520e78b..7b524b808d6 100644 --- a/docs/poetry_execution.md +++ b/docs/poetry_execution.md @@ -21,7 +21,7 @@ Knowing there was a lot this touched we expected to see some bugs and were quick [SERVER-81122](https://jira.mongodb.org/browse/SERVER-81122) found that poetry broke the spawnhost script. This was caught after merge. -[SERVER-81061](https://jira.mongodb.org/browse/SERVER-81061) and [BF-29909](https://jira.mongodb.org/browse/BF-29909) were found by sys-perf since they run their own build and do not use the standard build process. Therefor it was very hard to test for this one. This was caught post merge. +[SERVER-81061](https://jira.mongodb.org/browse/SERVER-81061) and [BF-29909](https://jira.mongodb.org/browse/BF-29909) were found by sys-perf since they run their own build and do not use the standard build process. Therefore it was very hard to test for this one. This was caught post merge. [SERVER-80799](https://jira.mongodb.org/browse/SERVER-80799) found that poetry broke mongo tooling metrics collection (not OTel). This was only found since an engineer on the team saw this bug in the code. This was caught post merge. diff --git a/etc/evergreen_yml_components/tasks/resmoke/server_divisions/durable_transactions_and_availability/tasks.yml b/etc/evergreen_yml_components/tasks/resmoke/server_divisions/durable_transactions_and_availability/tasks.yml index 9f4cd63d4c4..30ed36b25eb 100644 --- a/etc/evergreen_yml_components/tasks/resmoke/server_divisions/durable_transactions_and_availability/tasks.yml +++ b/etc/evergreen_yml_components/tasks/resmoke/server_divisions/durable_transactions_and_availability/tasks.yml @@ -1347,3 +1347,11 @@ tasks: - func: "generate resmoke tasks" vars: suite: timeseries_crud_jscore_passthrough + +- <<: *gen_task_template + name: v1index_jscore_passthrough_gen + tags: ["assigned_to_jira_team_server_execution", "misc_js"] + commands: + - func: "generate resmoke tasks" + vars: + suite: v1index_jscore_passthrough diff --git a/etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml b/etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml index f64d91ce200..80835727ef1 100644 --- a/etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml +++ b/etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml @@ -481,6 +481,7 @@ buildvariants: - name: test_packages distros: - ubuntu2204-large + - name: v1index_jscore_passthrough_gen - name: vector_search - name: vector_search_auth - name: vector_search_ssl diff --git a/jstests/libs/override_methods/create_v1_index.js b/jstests/libs/override_methods/create_v1_index.js new file mode 100644 index 00000000000..e46b66c5e99 --- /dev/null +++ b/jstests/libs/override_methods/create_v1_index.js @@ -0,0 +1,38 @@ +/** + * This file defines command overrides to create v:1 indexes by default. + */ +import {OverrideHelpers} from "jstests/libs/override_methods/override_helpers.js"; + +function runCommandOverride(conn, dbName, cmdName, cmdObj, clientFunction, makeFuncArgs) { + if (cmdName == "createIndexes") { + cmdObj["indexes"].forEach(index => { + // Ignore empty specs + if (Object.keys(index).length == 0) { + return; + } + // Avoid conflicts with the default _id index + if (Object.keys(index["key"]).length == 1 && index["key"]["_id"] == 1) { + return; + } + // v:1 does not support wildcards + for (let key in index["key"]) { + if (key.includes("$**")) { + return; + } + } + // v:1 does not support collation + if ("collation" in index) { + return; + } + // If v is not specified, default to v:1 + if (!("v" in index)) { + index["v"] = 1; + } + }); + } + // Call the original function, with a potentially modified command object. + return clientFunction.apply(conn, makeFuncArgs(cmdObj)); +} + +// Override the default runCommand with our custom version. +OverrideHelpers.overrideRunCommand(runCommandOverride); diff --git a/jstests/serverless/native_tenant_data_isolation_kill_op.js b/jstests/serverless/native_tenant_data_isolation_kill_op.js index b475fbfdb69..7a44475ae8a 100644 --- a/jstests/serverless/native_tenant_data_isolation_kill_op.js +++ b/jstests/serverless/native_tenant_data_isolation_kill_op.js @@ -97,7 +97,7 @@ function killCurrentOpTest() { createCollFP.off(); - // the current op was killed therefor the thread will throw an exception and wil return + // the current op was killed therefore the thread will throw an exception and wil return // code 252. const exitCode = parallelShell({checkExitSuccess: false}); assert.neq(0, exitCode, "Expected shell to exit with failure due to operation kill"); diff --git a/src/mongo/db/storage/key_string.cpp b/src/mongo/db/storage/key_string.cpp index edf95d272e0..82ffe9e4bc2 100644 --- a/src/mongo/db/storage/key_string.cpp +++ b/src/mongo/db/storage/key_string.cpp @@ -336,7 +336,7 @@ const double kInvPow256[] = {1.0, // const uint8_t kEnd = 0x4; -// These overlay with CType or kEnd bytes and therefor must be less/greater than all of +// These overlay with CType or kEnd bytes and therefore must be less/greater than all of // them (and their inverses). They also can't equal 0 or 255 since that would collide with // the encoding of NUL bytes in strings as "\x00\xff". const uint8_t kLess = 1;