diff options
author | William Schultz <william.schultz@mongodb.com> | 2018-12-21 16:33:36 -0500 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2018-12-21 16:43:58 -0500 |
commit | 435200964a1fc9de566e74bd579e99c308551670 (patch) | |
tree | f6d4e2723f794200b900c914818c8d9645df50f0 /buildscripts/resmokeconfig/suites/change_streams.yml | |
parent | f15556ae1ba4f78d2823d54e38d7025c7e9ca4fb (diff) | |
download | mongo-435200964a1fc9de566e74bd579e99c308551670.tar.gz |
SERVER-37560 Allow change streams to work with speculative majority reads
This patch allows change stream queries to use speculative majority reads so that they can be used even when enableMajorityReadConcern:false. Change stream aggregation commands are allowed to use speculative majority reads as well as 'find' commands that specify a special flag. This commit also enables all change streams tests and suites on the enableMajorityReadConcern:false Evergreen variant. No optimizations for speculative majority change streams are included in this commit.
Diffstat (limited to 'buildscripts/resmokeconfig/suites/change_streams.yml')
-rw-r--r-- | buildscripts/resmokeconfig/suites/change_streams.yml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/buildscripts/resmokeconfig/suites/change_streams.yml b/buildscripts/resmokeconfig/suites/change_streams.yml index 1b929eb4660..afd1bb10606 100644 --- a/buildscripts/resmokeconfig/suites/change_streams.yml +++ b/buildscripts/resmokeconfig/suites/change_streams.yml @@ -25,7 +25,18 @@ executor: TestData: defaultReadConcernLevel: null enableMajorityReadConcern: '' - eval: "var testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');" + # Enable causal consistency for change streams suites using 1 node replica sets. Some tests + # rely on the assumption that a w:majority write will be visible immediately in a subsequently + # opened change stream. In 1 node replica sets, an operation that majority commits at + # timestamp T will force the majority snapshot to advance to T, but the oplog visibility point + # may not have advanced to T yet. Subsequent majority snapshot reads will see this write in + # the oplog, but speculative majority reads may not, since they read from a local snapshot and + # are bound to the oplog visibility rules. Using causal consistency forces the visibility + # point to advance to the timestamp of the last write before doing a new read. + eval: >- + var testingReplication = true; + load('jstests/libs/override_methods/set_read_and_write_concerns.js'); + load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js'); readMode: commands hooks: # The CheckReplDBHash hook waits until all operations have replicated to and have been applied |