summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-06-10 18:53:25 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-29 17:38:02 +0000
commit22139444ca9372526900fcd454345f8c8a7f2988 (patch)
treec4ac462fba66ded53c30c1695637d7173647e8b8
parentab6c88a7db9b16ff8120a6c2ad63f2fe597bc388 (diff)
downloadmongo-22139444ca9372526900fcd454345f8c8a7f2988.tar.gz
SERVER-57273 remove flow_control_replica_set.js
This test fails sporadically due to causes unrelated to the feature this test was originally intended to test. Removing this test for now. For C++ unit test coverage, refer to mongo/db/storage/flow_control_test.cpp. (cherry picked from commit 17691de3ce474d8d9c476d1ee99590d8c3edd291)
-rw-r--r--jstests/serial_run/flow_control_replica_set.js66
1 files changed, 0 insertions, 66 deletions
diff --git a/jstests/serial_run/flow_control_replica_set.js b/jstests/serial_run/flow_control_replica_set.js
deleted file mode 100644
index 025c04e4e5b..00000000000
--- a/jstests/serial_run/flow_control_replica_set.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * This test artificially throttles a replica set by limiting the tickets handed out. It first
- * performs a calibrating run that sees how many inserts per second a one node replica set can
- * handle. Non-batch inserts should acquire one lock per insert. The test then sets the ticket
- * generation to a fraction of this discovered calibration value. A following benchrun validates the
- * new insert rate falls within some (generous) range.
- *
- * @tags: [
- * requires_replication,
- * requires_flow_control,
- * requires_majority_read_concern,
- * ]
- */
-(function() {
-"use strict";
-
-const replTest = new ReplSetTest({nodes: 1});
-replTest.startSet();
-replTest.initiate();
-
-const primary = replTest.getPrimary();
-
-assert.commandWorked(primary.adminCommand({
- configureFailPoint: "flowControlTicketOverride",
- mode: "alwaysOn",
- data: {"numTickets": 1000 * 1000 * 1000}
-}));
-// Sleep 2 seconds for the failpoint to take effect.
-sleep(2000);
-
-let result = benchRun({
- host: primary.host,
- seconds: 5,
- parallel: 5,
- ops: [{op: "insert", ns: "foo.bar", doc: {field: "value"}}]
-});
-jsTestLog({CalibratingRun: result});
-
-let insertRate = result["insert"];
-let throttledRate = insertRate / 2;
-assert.commandWorked(primary.adminCommand({
- configureFailPoint: "flowControlTicketOverride",
- mode: "alwaysOn",
- data: {"numTickets": NumberInt(throttledRate)}
-}));
-// Sleep 2 seconds for the failpoint to take effect.
-sleep(2000);
-
-result = benchRun({
- host: primary.host,
- seconds: 5,
- parallel: 5,
- ops: [{op: "insert", ns: "foo.bar", doc: {field: "value"}}]
-});
-jsTestLog({ThrottledRun: result, ThrottedRate: throttledRate});
-let maxAllowedRate = 1.5 * throttledRate;
-let minAllowedRate = 0.5 * throttledRate;
-assert.gt(result["insert"], minAllowedRate);
-assert.lt(result["insert"], maxAllowedRate);
-
-// Cautiously unset to avoid any interaction with shutdown.
-assert.commandWorked(
- primary.adminCommand({configureFailPoint: "flowControlTicketOverride", mode: "off"}));
-
-replTest.stopSet();
-})();