diff options
author | Ali Mir <ali.mir@mongodb.com> | 2020-05-07 14:54:29 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-11 23:45:44 +0000 |
commit | e1df22cefb30e43dd491591c7926e44d33af4119 (patch) | |
tree | c3108b5b0528031abec9aeb5bc2a819888fa54d8 | |
parent | 649790b0ba9df895f168ac061941eacb633792f9 (diff) | |
download | mongo-e1df22cefb30e43dd491591c7926e44d33af4119.tar.gz |
SERVER-47957 Set journaling to writeConcernMajorityJournalDefault when specifying write concern for inserts in rollback_test.js
-rw-r--r-- | jstests/replsets/libs/rollback_test.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/replsets/libs/rollback_test.js b/jstests/replsets/libs/rollback_test.js index d8f5163e8c4..fc6cc3baf3d 100644 --- a/jstests/replsets/libs/rollback_test.js +++ b/jstests/replsets/libs/rollback_test.js @@ -170,9 +170,13 @@ function RollbackTest(name = "RollbackTest", replSet) { // any other. If we do not do this, then due to initial sync timing and sync source // selection all nodes may not be guaranteed to have overlapping oplogs. const dbName = "EnsureAnyNodeCanSyncFromAnyOther"; + // To prevent losing this document due to unclean shutdowns, we need to + // ensure the insert was replicated and written to the on-disk journal of all 3 + // nodes, with the exception of ephemeral and in-memory storage engines where + // journaling isn't supported. assert.commandWorked(curPrimary.getDB(dbName).ensureSyncSource.insert( {thisDocument: 'is inserted to ensure any node can sync from any other'}, - {writeConcern: {w: 3}})); + {writeConcern: {w: 3, j: config.writeConcernMajorityJournalDefault}})); } /** |