summaryrefslogtreecommitdiff
path: root/jstests/replsets/rollback_index_build_start_abort.js
blob: eb65327f838517aa5220abdaeca230b9c8a486a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 * Tests different permutations of rolling-back index build start and abort oplog entries.
 */
(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();
})();