0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00
mongodb/jstests/replsets/rollback_index_build_start_abort.js

22 lines
700 B
JavaScript

/**
* Tests different permutations of rolling-back index build start and abort oplog entries.
* @tags: [requires_fcv_44]
*/
(function() {
"use strict";
// for RollbackIndexBuildTest
load('jstests/replsets/libs/rollback_index_builds_test.js');
const rollbackIndexTest = new RollbackIndexBuildsTest();
// Build a schedule of operations interleaving rollback and an index build.
const rollbackOps = ["holdStableTimestamp", "transitionToRollback"];
const indexBuildOps = ["start", "abort"];
// This generates 4 choose 2, or 6 schedules.
const schedules = RollbackIndexBuildsTest.makeSchedules(rollbackOps, indexBuildOps);
rollbackIndexTest.runSchedules(schedules);
rollbackIndexTest.stop();
})();