summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/SConscript
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2019-01-24 20:35:57 -0500
committerDaniel Gottlieb <daniel.gottlieb@mongodb.com>2019-01-24 20:35:57 -0500
commit5f213f2d419d9549559281fef7d3704ad7614d12 (patch)
tree6c37c0f4c12d53fcfd0faefa63807de46a280f05 /src/mongo/db/storage/SConscript
parent3a1b11c960c6fc9bc5c94e4d5cd58f38c78ca55b (diff)
downloadmongo-5f213f2d419d9549559281fef7d3704ad7614d12.tar.gz
SERVER-38499: Enforce oplog visibility at the MongoDB layer.
WiredTiger guards against transactions preparing with a timestamp earlier than the most recent reader. This guarantees no reader may have seen the wrong version of a document. The oplog is a special case. Because the oplog does not contain prepared updates, and oplog readers cannot read from other collections, it's valid to prepare behind an oplog readers timestamp. However, WiredTiger is not aware the oplog is special. When MongoDB uses WiredTiger `read_timestamp`s to enforce oplog visibility, there are cases (specifically, secondary oplog application) where an oplog reader can be in front of an impending prepare. There were two strategies available for resolving this. The first is to artificially hold back what oplog is available to read at until nothing can be prepared behind an oplog reader. The second strategy, which is what this patch does, is to have the MongoDB layer hide documents that are newer than the visibility point. The mechanism for calculating and discovering the visibility point is unchanged.
Diffstat (limited to 'src/mongo/db/storage/SConscript')
-rw-r--r--src/mongo/db/storage/SConscript1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript
index e82a86d5cdb..4d3f4bec2af 100644
--- a/src/mongo/db/storage/SConscript
+++ b/src/mongo/db/storage/SConscript
@@ -251,6 +251,7 @@ env.Library(
LIBDEPS_PRIVATE=[
"$BUILD_DIR/mongo/base",
"$BUILD_DIR/mongo/db/storage/storage_options",
+ '$BUILD_DIR/mongo/util/fail_point',
],
)