diff options
author | William Schultz <william.schultz@mongodb.com> | 2018-12-21 16:33:35 -0500 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2018-12-21 16:43:58 -0500 |
commit | f15556ae1ba4f78d2823d54e38d7025c7e9ca4fb (patch) | |
tree | 74207795633775a6cd080534c0ea29693bc9a682 /src/mongo/db/read_concern.cpp | |
parent | 7b85fb049b087fbcb04d6f356a0f7bee9ef48190 (diff) | |
download | mongo-f15556ae1ba4f78d2823d54e38d7025c7e9ca4fb.tar.gz |
SERVER-37560 Add core functionality for speculative majority reads
This patch adds functionality for "speculative" majority reads. These are reads that can satisfy "majority" read concern guarantees without support from the storage engine for reading from a historical snapshot. Queries of this nature will, by default, wait on the most recent lastApplied optime to majority commit after they complete, but before returning to the client. They can also optionally set a custom optime T to wait on, if they know that they did not read any data that reflects the effects of operations newer than optime T.
Diffstat (limited to 'src/mongo/db/read_concern.cpp')
-rw-r--r-- | src/mongo/db/read_concern.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/read_concern.cpp b/src/mongo/db/read_concern.cpp index c86c0a6a09b..3389668d92d 100644 --- a/src/mongo/db/read_concern.cpp +++ b/src/mongo/db/read_concern.cpp @@ -34,5 +34,6 @@ namespace mongo { MONGO_DEFINE_SHIM(waitForReadConcern); MONGO_DEFINE_SHIM(waitForLinearizableReadConcern); +MONGO_DEFINE_SHIM(waitForSpeculativeMajorityReadConcern); } // namespace mongo |