diff options
author | Matthew Russotto <matthew.russotto@10gen.com> | 2018-09-14 10:13:35 -0400 |
---|---|---|
committer | Matthew Russotto <matthew.russotto@10gen.com> | 2018-09-14 10:17:42 -0400 |
commit | c46faf4672c81d4801014981669d770fc65b950e (patch) | |
tree | 779e165fa75ed59b9c06b474f6ca5f7b6ac97f09 /src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | |
parent | f92a1d2aaf0f4d2874f64a5e1b3c12fc66e39d4d (diff) | |
download | mongo-c46faf4672c81d4801014981669d770fc65b950e.tar.gz |
SERVER-35821 readConcern:snapshot transactions need a read timestamp <= WT's all_committed point
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_external_state_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index cefbf8d3bd9..97dc1c9bf9f 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -621,6 +621,11 @@ void ReplicationCoordinatorExternalStateImpl::setGlobalTimestamp(ServiceContext* setNewTimestamp(ctx, newTime); } +bool ReplicationCoordinatorExternalStateImpl::oplogExists(OperationContext* opCtx) { + AutoGetCollection oplog(opCtx, NamespaceString::kRsOplogNamespace, MODE_IS); + return oplog.getCollection() != nullptr; +} + StatusWith<OpTime> ReplicationCoordinatorExternalStateImpl::loadLastOpTime( OperationContext* opCtx) { // TODO: handle WriteConflictExceptions below |