From f28aae9ab76fb03f9df1adc4ec1a516048a49f38 Mon Sep 17 00:00:00 2001 From: Gregory Noma Date: Thu, 25 Mar 2021 10:08:31 -0400 Subject: SERVER-55282 Skip data consistency checks when transitioning to steady state operations in rollback_resumable_index_build_collection_scan_phase_large.js --- jstests/replsets/libs/rollback_resumable_index_build.js | 11 ++++++++--- ...lback_resumable_index_build_collection_scan_phase_large.js | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/jstests/replsets/libs/rollback_resumable_index_build.js b/jstests/replsets/libs/rollback_resumable_index_build.js index 7f5baacffb6..f0961a2432a 100644 --- a/jstests/replsets/libs/rollback_resumable_index_build.js +++ b/jstests/replsets/libs/rollback_resumable_index_build.js @@ -59,6 +59,10 @@ const RollbackResumableIndexBuildTest = class { * fixture should be expected to be completed when this function returns. If false, this * function returns the collections, buildUUIDs, and index names of the index builds started * by the test fixture. + * + * 'skipDataConsistencyChecks' is a boolean which determines whether data consistency checks + * should be skipped by the rollback test fixture when transitioning to steady state + * operations. */ static run(rollbackTest, dbName, @@ -74,7 +78,7 @@ const RollbackResumableIndexBuildTest = class { resumeChecks, insertsToBeRolledBack, sideWrites = [], - shouldComplete = true) { + {shouldComplete = true, skipDataConsistencyChecks = false} = {}) { const originalPrimary = rollbackTest.getPrimary(); if (!ResumableIndexBuildTest.resumableIndexBuildsEnabled(originalPrimary)) { @@ -233,7 +237,8 @@ const RollbackResumableIndexBuildTest = class { }); } - rollbackTest.transitionToSteadyStateOperations(); + rollbackTest.transitionToSteadyStateOperations( + {skipDataConsistencyChecks: skipDataConsistencyChecks}); if (shouldComplete) { // Ensure that the index builds completed after rollback. @@ -279,7 +284,7 @@ const RollbackResumableIndexBuildTest = class { [{numScannedAferResume: docs.length - 1}], insertsToBeRolledBack, sideWrites, - false /* shouldComplete */); + {shouldComplete: false}); // Cycle through the rollback test phases so the original primary becomes primary again. rollbackTest.transitionToRollbackOperations(); diff --git a/jstests/replsets/rollback_resumable_index_build_collection_scan_phase_large.js b/jstests/replsets/rollback_resumable_index_build_collection_scan_phase_large.js index 8d0b7550034..fb96a91f4f7 100644 --- a/jstests/replsets/rollback_resumable_index_build_collection_scan_phase_large.js +++ b/jstests/replsets/rollback_resumable_index_build_collection_scan_phase_large.js @@ -55,7 +55,9 @@ const runRollbackTo = function(rollbackEndFailPointName, rollbackEndFailPointLog // to locks needing to be yielded before the rollback can occur. Thus, we subtract 1 from // the difference. [{numScannedAferResume: numDocuments - maxIndexBuildMemoryUsageMB - 1}], - [{a: 1}, {a: 2}]); + [{a: 1}, {a: 2}], + [], + {skipDataConsistencyChecks: true}); }; // Rollback to before the index begins to be built. -- cgit v1.2.1