diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-12-16 18:49:39 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-16 18:49:39 +0000 |
commit | 59152df7655101ee551d6432727170b42fcd136f (patch) | |
tree | 0036dd72644c697f4a1e265f1eee948b9cfaa913 /jstests/replsets/rollback_index_build_start_abort_not_create.js | |
parent | 4cba7e97d3561efe26a7145c03bb91648343f396 (diff) | |
download | mongo-59152df7655101ee551d6432727170b42fcd136f.tar.gz |
SERVER-39452 Support rollback via refetch for two-phase index builds
Diffstat (limited to 'jstests/replsets/rollback_index_build_start_abort_not_create.js')
-rw-r--r-- | jstests/replsets/rollback_index_build_start_abort_not_create.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/jstests/replsets/rollback_index_build_start_abort_not_create.js b/jstests/replsets/rollback_index_build_start_abort_not_create.js new file mode 100644 index 00000000000..00c8c36a9ee --- /dev/null +++ b/jstests/replsets/rollback_index_build_start_abort_not_create.js @@ -0,0 +1,28 @@ +/** + * Test that rolling back an index build, but not collection creation, behaves correctly even when + * the index build is aborted. + */ +(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", + // Abort the index build + "abort", +]; + +rollbackIndexTest.runSchedules([schedule]); +rollbackIndexTest.stop(); +})(); |