summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2022-05-10 21:52:27 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-10 22:26:21 +0000
commit6a16461988b990f6ea2ebe4e129bad1addada035 (patch)
tree1a51a99f3c3ef2a1cd875e8b866f5464e278ae1c
parentbe429f18e15b79ecce43ac9679e3b244c9e7b2f5 (diff)
downloadmongo-6a16461988b990f6ea2ebe4e129bad1addada035.tar.gz
Revert "SERVER-65639 Add concurrency workload that kills sessions with active internal transactions started using test command"
This reverts commit 2fade9ad761d322d95bf3f7a315d412baac5a309.
-rw-r--r--buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_cursor_sweeps.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_eviction_debug.yml2
-rw-r--r--jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_nonretryable.js117
-rw-r--r--jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js87
-rw-r--r--jstests/concurrency/fsm_workloads/internal_transactions_unsharded.js8
6 files changed, 1 insertions, 217 deletions
diff --git a/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication.yml b/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication.yml
index bf3144874f0..002ecf94f96 100644
--- a/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication.yml
+++ b/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication.yml
@@ -34,8 +34,6 @@ selector:
# 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/internal_transactions_kill_sessions_nonretryable.js
- - jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_simple_kill_sessions.js
diff --git a/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_cursor_sweeps.yml b/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_cursor_sweeps.yml
index eadb532fce8..6507ee50686 100644
--- a/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_cursor_sweeps.yml
+++ b/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_cursor_sweeps.yml
@@ -34,8 +34,6 @@ selector:
# 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/internal_transactions_kill_sessions_nonretryable.js
- - jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_simple_kill_sessions.js
diff --git a/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_eviction_debug.yml b/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_eviction_debug.yml
index 3f8a54b446f..841fe44b3c0 100644
--- a/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_eviction_debug.yml
+++ b/buildscripts/resmokeconfig/suites/concurrency_simultaneous_replication_wiredtiger_eviction_debug.yml
@@ -34,8 +34,6 @@ selector:
# 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/internal_transactions_kill_sessions_nonretryable.js
- - jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
- jstests/concurrency/fsm_workloads/multi_statement_transaction_simple_kill_sessions.js
diff --git a/jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_nonretryable.js b/jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_nonretryable.js
deleted file mode 100644
index cf8fc1c4279..00000000000
--- a/jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_nonretryable.js
+++ /dev/null
@@ -1,117 +0,0 @@
-'use strict';
-
-/**
- * Performs CRUD commands using non-retryable internal transactions while simultaneously killing
- * sessions.
- *
- * @tags: [
- * requires_fcv_60,
- * uses_transactions,
- * ]
- */
-
-load('jstests/concurrency/fsm_libs/extend_workload.js');
-load('jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js');
-load('jstests/libs/fail_point_util.js');
-
-var $config = extendWorkload($config, function($config, $super) {
- $config.data.generateRandomExecutionContext = function generateRandomExecutionContext() {
- if (this.shouldUseCausalConsistency) {
- // Exclude kNoClientSession since a casually consistent session is required.
- return 2;
- }
- return this.generateRandomInt(1, 2);
- };
-
- $config.data.runInternalTransaction = function runInternalTransaction(
- db, collection, executionCtxType, writeCmdObj, checkResponseFunc, checkDocsFunc) {
- try {
- $super.data.runInternalTransaction.apply(this, arguments);
- } catch (e) {
- if (e.code == ErrorCodes.Interrupted) {
- // killSession commands generate interrupted errors, so this is not a reason to
- // abort the workload. Continue to the next iteration.
- return;
- }
- throw e;
- }
- };
-
- $config.setup = function setup(db, collName, cluster) {
- $super.setup.apply(this, arguments);
- if (cluster.isSharded()) {
- cluster.executeOnMongosNodes((db) => {
- configureFailPoint(db, "skipTransactionApiRetryCheckInHandleError");
- });
- } else if (cluster.isReplication()) {
- configureFailPoint(db, "skipTransactionApiRetryCheckInHandleError");
- }
- };
-
- // Sessions may be killed after transactions are already in the prepared state, so local
- // document state may not accurately reflect the document's state in the database.
- $config.data.expectDirtyDocs["skipCheckDocs"] = true;
-
- $config.teardown = function teardown(db, collName, cluster) {
- if (cluster.isSharded()) {
- cluster.executeOnMongosNodes((db) => {
- configureFailPoint(db, "skipTransactionApiRetryCheckInHandleError", {}, "off");
- });
- } else if (cluster.isReplication()) {
- configureFailPoint(db, "skipTransactionApiRetryCheckInHandleError");
- }
- };
-
- $config.transitions = {
- init: {
- killSession: 0.2,
- internalTransactionForInsert: 0.2,
- internalTransactionForUpdate: 0.2,
- internalTransactionForDelete: 0.2,
- internalTransactionForFindAndModify: 0.2,
- },
- killSession: {
- internalTransactionForInsert: 0.25,
- internalTransactionForUpdate: 0.25,
- internalTransactionForDelete: 0.25,
- internalTransactionForFindAndModify: 0.25,
- },
- internalTransactionForInsert: {
- killSession: 0.4,
- internalTransactionForInsert: 0.15,
- internalTransactionForUpdate: 0.15,
- internalTransactionForDelete: 0.15,
- internalTransactionForFindAndModify: 0.15,
- },
- internalTransactionForUpdate: {
- killSession: 0.4,
- internalTransactionForInsert: 0.15,
- internalTransactionForUpdate: 0.15,
- internalTransactionForDelete: 0.15,
- internalTransactionForFindAndModify: 0.15,
- },
- internalTransactionForDelete: {
- killSession: 0.4,
- internalTransactionForInsert: 0.15,
- internalTransactionForUpdate: 0.15,
- internalTransactionForDelete: 0.15,
- internalTransactionForFindAndModify: 0.15,
- },
- internalTransactionForFindAndModify: {
- killSession: 0.4,
- internalTransactionForInsert: 0.15,
- internalTransactionForUpdate: 0.15,
- internalTransactionForDelete: 0.15,
- internalTransactionForFindAndModify: 0.15,
- },
- verifyDocuments: {
- killSession: 0.4,
- internalTransactionForInsert: 0.15,
- internalTransactionForUpdate: 0.15,
- internalTransactionForDelete: 0.15,
- internalTransactionForFindAndModify: 0.15,
- }
- };
-
- return $config;
-});
diff --git a/jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js b/jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js
deleted file mode 100644
index 40e34cbbe3c..00000000000
--- a/jstests/concurrency/fsm_workloads/internal_transactions_kill_sessions_retryable.js
+++ /dev/null
@@ -1,87 +0,0 @@
-'use strict';
-
-/**
- * Performs CRUD commands using retryable internal transactions while simultaneously killing
- * sessions.
- *
- * @tags: [
- * requires_fcv_60,
- * uses_transactions,
- * ]
- */
-
-load('jstests/concurrency/fsm_libs/extend_workload.js');
-load('jstests/concurrency/fsm_workload_helpers/kill_session.js'); // for killSession
-load('jstests/concurrency/fsm_workloads/internal_transactions_unsharded.js');
-load('jstests/libs/override_methods/retry_on_killed_session.js');
-
-var $config = extendWorkload($config, function($config, $super) {
- $config.data.retryOnKilledSession = true;
-
- $config.states.killSession = function(db, collName) {
- return killSession(db, collName);
- };
-
- $config.data.generateRandomExecutionContext = function generateRandomExecutionContext() {
- return this.generateRandomInt(3, 4);
- };
-
- $config.transitions = {
- init: {
- killSession: 0.2,
- internalTransactionForInsert: 0.2,
- internalTransactionForUpdate: 0.2,
- internalTransactionForDelete: 0.2,
- internalTransactionForFindAndModify: 0.2,
- },
- killSession: {
- internalTransactionForInsert: 0.2,
- internalTransactionForUpdate: 0.2,
- internalTransactionForDelete: 0.2,
- internalTransactionForFindAndModify: 0.2,
- verifyDocuments: 0.2
- },
- internalTransactionForInsert: {
- killSession: 0.4,
- internalTransactionForInsert: 0.12,
- internalTransactionForUpdate: 0.12,
- internalTransactionForDelete: 0.12,
- internalTransactionForFindAndModify: 0.12,
- verifyDocuments: 0.12
- },
- internalTransactionForUpdate: {
- killSession: 0.4,
- internalTransactionForInsert: 0.12,
- internalTransactionForUpdate: 0.12,
- internalTransactionForDelete: 0.12,
- internalTransactionForFindAndModify: 0.12,
- verifyDocuments: 0.12
- },
- internalTransactionForDelete: {
- killSession: 0.4,
- internalTransactionForInsert: 0.12,
- internalTransactionForUpdate: 0.12,
- internalTransactionForDelete: 0.12,
- internalTransactionForFindAndModify: 0.12,
- verifyDocuments: 0.12
- },
- internalTransactionForFindAndModify: {
- killSession: 0.4,
- internalTransactionForInsert: 0.12,
- internalTransactionForUpdate: 0.12,
- internalTransactionForDelete: 0.12,
- internalTransactionForFindAndModify: 0.12,
- verifyDocuments: 0.12
- },
- verifyDocuments: {
- killSession: 0.4,
- internalTransactionForInsert: 0.12,
- internalTransactionForUpdate: 0.12,
- internalTransactionForDelete: 0.12,
- internalTransactionForFindAndModify: 0.12,
- verifyDocuments: 0.12
- }
- };
-
- return $config;
-});
diff --git a/jstests/concurrency/fsm_workloads/internal_transactions_unsharded.js b/jstests/concurrency/fsm_workloads/internal_transactions_unsharded.js
index a139b275fce..a00261f6a2d 100644
--- a/jstests/concurrency/fsm_workloads/internal_transactions_unsharded.js
+++ b/jstests/concurrency/fsm_workloads/internal_transactions_unsharded.js
@@ -65,9 +65,6 @@ var $config = extendWorkload($config, function($config, $super) {
[$config.data.executionContextTypes.kClientSession]: false,
[$config.data.executionContextTypes.kClientRetryableWrite]: false,
[$config.data.executionContextTypes.kClientTransaction]: false,
- // Set this flag to skip the checkDocFuncs step. This is relevant if the workloads behavior
- // causes the state of the docs to be indeterminable.
- ["skipCheckDocs"]: false
};
// This workload sets the 'storeFindAndModifyImagesInSideCollection' parameter to a random bool
@@ -310,10 +307,7 @@ var $config = extendWorkload($config, function($config, $super) {
delete this.dirtyDocs[executionCtxType][docToInsert._id];
print("Finished internal transaction");
- // Skip checking documents that may have been modified in a non deterministic way.
- if (!this.expectDirtyDocs["skipCheckDocs"]) {
- checkDocsFunc();
- }
+ checkDocsFunc();
assert.eq(collection.findOne({_id: docToInsert._id}), docToInsert);
this.expectedCounters[docToInsert._id] = docToInsert.counter;
};