diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-04-12 13:40:14 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-04-13 13:06:42 -0400 |
commit | efb0b0f6572d2e175f3611246f8cd13fe4128d15 (patch) | |
tree | 82bc3033e00372c192848c9c65eac427ca14da7c /jstests/noPassthrough/readConcern_snapshot_mongos.js | |
parent | fde45e48ef4a86fb19604843fdee272a22fcd475 (diff) | |
download | mongo-efb0b0f6572d2e175f3611246f8cd13fe4128d15.tar.gz |
SERVER-33989 Add support for afterClusterTime for snapshot reads through mongos
Diffstat (limited to 'jstests/noPassthrough/readConcern_snapshot_mongos.js')
-rw-r--r-- | jstests/noPassthrough/readConcern_snapshot_mongos.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/jstests/noPassthrough/readConcern_snapshot_mongos.js b/jstests/noPassthrough/readConcern_snapshot_mongos.js index cbc5d3137fc..6d5d4b7d342 100644 --- a/jstests/noPassthrough/readConcern_snapshot_mongos.js +++ b/jstests/noPassthrough/readConcern_snapshot_mongos.js @@ -106,20 +106,26 @@ assert.commandWorked(sessionDb.runCommand( {find: collName, readConcern: {level: "snapshot"}, txnNumber: NumberLong(txnNumber++)})); + // readConcern 'snapshot' is allowed with 'afterClusterTime'. + assert.commandWorked(sessionDb.runCommand({ + find: collName, + readConcern: {level: "snapshot", afterClusterTime: clusterTime}, + txnNumber: NumberLong(txnNumber++) + })); + assert.commandWorked(sessionDb.runCommand({ + aggregate: collName, + pipeline: [], + cursor: {}, + readConcern: {level: "snapshot", afterClusterTime: clusterTime}, + txnNumber: NumberLong(txnNumber++) + })); + assert.commandWorked(sessionDb.coll.insert({}, {w: 2})); assert.commandWorked(coll.createIndex({geo: "2d"})); assert.commandWorked(coll.createIndex({haystack: "geoHaystack", a: 1}, {bucketSize: 1})); // Passthrough tests that are not implemented yet. - // - // readConcern 'snapshot' is allowed with 'afterClusterTime'. - // TODO SERVER-33989: Add support for afterClusterTime for snapshot reads through mongos. - assert.commandFailedWithCode(sessionDb.runCommand({ - find: collName, - readConcern: {level: "snapshot", afterClusterTime: clusterTime}, - txnNumber: NumberLong(txnNumber++) - }), - ErrorCodes.InvalidOptions); + // TODO SERVER-33709: Add snapshot support for cluster count on mongos. assert.commandFailedWithCode(sessionDb.runCommand({ count: collName, |