SERVER-119904: Set defaults for storage engine cache size in resmoke_suite_test (#48271)

GitOrigin-RevId: d347ae3145ec35b741def678eebdee6b0d00c15c
This commit is contained in:
Sean Lyons
2026-02-18 16:11:06 -05:00
committed by MongoDB Bot
parent 54a1582c93
commit 105a0be655
3 changed files with 15 additions and 13 deletions

View File

@@ -105,6 +105,19 @@ if __name__ == "__main__":
"--suites", "--originSuite"
)
# Reduce the storage engine's cache size (if not already set) to reduce the likelihood
# of a mongod process being killed by the OOM killer. The configuration of the
# cache size is duplicated in evergreen/resmoke_tests_execute.sh, please update both.
storage_engine_in_memory = "--storageEngine=inMemory" in resmoke_args
storage_engine_cache_arg = [
arg for arg in resmoke_args if arg.startswith("--storageEngineCacheSizeGB")
]
if not storage_engine_cache_arg:
if storage_engine_in_memory:
resmoke_args.append("--storageEngineCacheSizeGB=4")
else:
resmoke_args.append("--storageEngineCacheSizeGB=1")
add_evergreen_build_info(resmoke_args)
if os.environ.get("DEPS_PATH"):

View File

@@ -55,9 +55,6 @@ resmoke_suite_test(
# Queryable encryption is not supported on standalone.
"//jstests/core/query/queryable_encryption:all_subpackage_javascript_files",
],
resmoke_args = [
"--storageEngineCacheSizeGB=1",
],
shard_count = 24,
tags = [
"ci-development-critical-single-variant",
@@ -81,9 +78,6 @@ resmoke_suite_test(
],
config = ":suites/jstestfuzz.yml",
data = [":common_jstest_data"],
resmoke_args = [
"--storageEngineCacheSizeGB=1",
],
tags = [
"manual", # exclude from expansion of target pattern wildcards (..., :*, :all, etc.)
],
@@ -110,9 +104,6 @@ resmoke_suite_test(
":matrix_suites/overrides/multiversion.yml",
"//:multiversion_binaries",
],
resmoke_args = [
"--storageEngineCacheSizeGB=1",
],
shard_count = 1,
tags = [
"manual", # exclude from expansion of target pattern wildcards (..., :*, :all, etc.)
@@ -140,9 +131,6 @@ resmoke_suite_test(
":matrix_suites/overrides/multiversion.yml",
"//:multiversion_binaries",
],
resmoke_args = [
"--storageEngineCacheSizeGB=1",
],
shard_count = 1,
tags = [
"manual", # exclude from expansion of target pattern wildcards (..., :*, :all, etc.)

View File

@@ -91,7 +91,8 @@ if [[ ${disable_unit_tests} = "false" && ! -f ${skip_tests} ]]; then
# We reduce the storage engine's cache size to reduce the likelihood of a mongod process
# being killed by the OOM killer. The --storageEngineCacheSizeGB command line option is only
# filled in with a default value here if one hasn't already been specified in the task's
# definition or build variant's definition.
# definition or build variant's definition. The configuration of cache size is duplicated in
# bazel/resmoke/resmoke_shim.py, please update both.
set +o errexit
echo "${resmoke_args} ${test_flags}" | grep -q storageEngineCacheSizeGB
if [ $? -eq 1 ]; then