diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2020-12-10 16:10:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-04 23:28:32 +0000 |
commit | 82dd40f60c55dae12426c08fd7150d79a0e28e23 (patch) | |
tree | e041f9ccd41b2ef861f2b54dcf882b075a581da2 /jstests/replsets/read_concern_uninitated_set.js | |
parent | 9387b3daca940c1c2b8a7527f62bb7bab42b187f (diff) | |
download | mongo-r4.2.13.tar.gz |
SERVER-47568 Disable clusterTime gossiping for nodes in unreadable statesr4.2.13-rc2r4.2.13
(cherry picked from commit 024b130c5e66bafd99cf7f899cdef8d23284ef81)
Diffstat (limited to 'jstests/replsets/read_concern_uninitated_set.js')
-rw-r--r-- | jstests/replsets/read_concern_uninitated_set.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/replsets/read_concern_uninitated_set.js b/jstests/replsets/read_concern_uninitated_set.js index 71f9b2c6956..209c7c5b826 100644 --- a/jstests/replsets/read_concern_uninitated_set.js +++ b/jstests/replsets/read_concern_uninitated_set.js @@ -36,16 +36,18 @@ assert.commandFailedWithCode( {find: "test", filter: {}, maxTimeMS: 60000, readConcern: {level: "majority"}}), ErrorCodes.NotYetInitialized); -jsTestLog("afterClusterTime readConcern should fail with NotYetInitialized."); +// Nodes don't process $clusterTime metadata when in an unreadable state, so this read will fail +// because the logical clock's latest value is less than the given afterClusterTime timestamp. +jsTestLog("afterClusterTime readConcern should fail with InvalidOptions."); assert.commandFailedWithCode(localDB.runCommand({ find: "test", filter: {}, maxTimeMS: 60000, readConcern: {afterClusterTime: Timestamp(1, 1)} }), - ErrorCodes.NotYetInitialized); + ErrorCodes.InvalidOptions); -jsTestLog("oplog query should fail with NotYetInitialized."); +jsTestLog("oplog query should fail with InvalidOptions."); assert.commandFailedWithCode(localDB.runCommand({ find: "oplog.rs", filter: {ts: {$gte: Timestamp(1520004466, 2)}}, @@ -57,6 +59,6 @@ assert.commandFailedWithCode(localDB.runCommand({ term: 1, readConcern: {afterClusterTime: Timestamp(1, 1)} }), - ErrorCodes.NotYetInitialized); + ErrorCodes.InvalidOptions); rst.stopSet(); }()); |