summaryrefslogtreecommitdiff
path: root/jstests/replsets/rollback_index_build_start_not_create.js
blob: e56990e08ad9c3342d81a9c2eb22f912ae4f6019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * Test that rolling back an index build, but not collection creation, behaves correctly.
 */
(function() {
"use strict";

// For RollbackIndexBuildsTest
load('jstests/replsets/libs/rollback_index_builds_test.js');

const rollbackIndexTest = new RollbackIndexBuildsTest();

const schedule = [
    // Create the collection
    "createColl",
    // Hold the stable timestamp, if applicable.
    "holdStableTimestamp",
    // Everything after this will be rolled-back.
    "transitionToRollback",
    // The index build will be rolled-back.
    "start",
    // Allow the index build to proceed on the rolling-back node.
    "commit",
];

rollbackIndexTest.runSchedules([schedule]);
rollbackIndexTest.stop();
})();