summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
authorAllison Easton <allison.easton@mongodb.com>2023-05-10 13:18:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-10 14:31:47 +0000
commit48be174f68488b8e0c5695081afe1d41260a259f (patch)
tree03abf412b66e0ea1a8935b7d64a79c4cf531d50e /jstests/concurrency
parente6b0b4376c7c6ca66cba6478bfb1f0aa63d6c33f (diff)
downloadmongo-48be174f68488b8e0c5695081afe1d41260a259f.tar.gz
SERVER-73866 Re-enable agg_merge_when_not_matched_insert.js in config_fuzzer passthrough suites
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_workloads/agg_merge_when_not_matched_insert.js46
1 files changed, 44 insertions, 2 deletions
diff --git a/jstests/concurrency/fsm_workloads/agg_merge_when_not_matched_insert.js b/jstests/concurrency/fsm_workloads/agg_merge_when_not_matched_insert.js
index 739a7dc50e0..60f8565ffa5 100644
--- a/jstests/concurrency/fsm_workloads/agg_merge_when_not_matched_insert.js
+++ b/jstests/concurrency/fsm_workloads/agg_merge_when_not_matched_insert.js
@@ -11,8 +11,6 @@
* assumes_balancer_off,
* requires_non_retryable_writes,
* incompatible_with_gcov,
- * # The config fuzzer causes certain commands to time out periodically.
- * does_not_support_config_fuzzer,
*]
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload
@@ -23,6 +21,8 @@ var $config = extendWorkload($config, function($config, $super) {
$config.data.collWithMigrations = "agg_merge_when_not_matched_insert";
$config.data.threadRunCount = 0;
+ let initialMaxCatchUpPercentageBeforeBlockingWrites = null;
+
$config.states.aggregate = function aggregate(db, collName, connCache) {
const res = db[collName].aggregate([
{
@@ -52,5 +52,47 @@ var $config = extendWorkload($config, function($config, $super) {
this.threadRunCount += 1;
};
+ // This test is sensitive to low values of the parameter
+ // maxCatchUpPercentageBeforeBlockingWrites, which can be set by the config server. We set a min
+ // bound for this parameter here.
+ $config.setup = function setup(db, collName, cluster) {
+ $super.setup.apply(this, [db, collName, cluster]);
+
+ cluster.executeOnMongodNodes((db) => {
+ const param = assert.commandWorked(
+ db.adminCommand({getParameter: 1, maxCatchUpPercentageBeforeBlockingWrites: 1}));
+ if (param.hasOwnProperty("maxCatchUpPercentageBeforeBlockingWrites")) {
+ const defaultValue = 10;
+ if (param.maxCatchUpPercentageBeforeBlockingWrites < defaultValue) {
+ jsTest.log(
+ "Parameter `maxCatchUpPercentageBeforeBlockingWrites` value too low: " +
+ param.maxCatchUpPercentageBeforeBlockingWrites +
+ ". Setting value to default: " + defaultValue + ".");
+ initialMaxCatchUpPercentageBeforeBlockingWrites =
+ param.maxCatchUpPercentageBeforeBlockingWrites;
+ assert.commandWorked(db.adminCommand(
+ {setParameter: 1, maxCatchUpPercentageBeforeBlockingWrites: defaultValue}));
+ }
+ }
+ });
+ };
+
+ $config.teardown = function teardown(db, collName, cluster) {
+ if (initialMaxCatchUpPercentageBeforeBlockingWrites) {
+ jsTest.log(
+ "Resetting parameter `maxCatchUpPercentageBeforeBlockingWrites` to original value: " +
+ initialMaxCatchUpPercentageBeforeBlockingWrites);
+ cluster.executeOnMongodNodes((db) => {
+ assert.commandWorked(db.adminCommand({
+ setParameter: 1,
+ maxCatchUpPercentageBeforeBlockingWrites:
+ initialMaxCatchUpPercentageBeforeBlockingWrites
+ }));
+ });
+ }
+
+ $super.teardown.apply(this, [db, collName, cluster]);
+ };
+
return $config;
});