summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_coordinator_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.h')
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.h b/src/mongo/db/repl/replication_coordinator_impl.h
index dcf29656c3f..5003435147e 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.h
+++ b/src/mongo/db/repl/replication_coordinator_impl.h
@@ -169,7 +169,7 @@ public:
virtual OpTime getMyLastDurableOpTime() const override;
virtual Status waitUntilOpTimeForRead(OperationContext* opCtx,
- const ReadConcernArgs& settings) override;
+ const ReadConcernArgs& readConcern) override;
virtual OID getElectionId() override;
@@ -582,6 +582,16 @@ private:
OpTime _getCurrentCommittedSnapshotOpTime_inlock() const;
/**
+ * Returns the OpTime of the current committed snapshot converted to LogicalTime.
+ */
+ LogicalTime _getCurrentCommittedLogicalTime_inlock() const;
+
+ /**
+ * Verifies that ReadConcernArgs match node's readConcern.
+ */
+ Status _validateReadConcern(OperationContext* opCtx, const ReadConcernArgs& readConcern);
+
+ /**
* Helper method that removes entries from _slaveInfo if they correspond to a node
* with a member ID that is not in the current replica set config. Will always leave an
* entry for ourself at the beginning of _slaveInfo, even if we aren't present in the
@@ -1171,6 +1181,20 @@ private:
*/
ReplicationExecutor::EventHandle _cancelElectionIfNeeded_inTopoLock();
+ /**
+ * Waits until the optime of the current node is at least the opTime specified in 'readConcern'.
+ * It supports local readConcern, which _waitUntilClusterTimeForRead does not.
+ * TODO: remove when SERVER-28150 is done.
+ */
+ Status _waitUntilOpTimeForReadDeprecated(OperationContext* opCtx,
+ const ReadConcernArgs& readConcern);
+
+ /**
+ * Waits until the logicalTime of the current node is at least the 'clusterTime'.
+ * TODO: Merge with waitUntilOpTimeForRead() when SERVER-28150 is done.
+ */
+ Status _waitUntilClusterTimeForRead(OperationContext* opCtx, LogicalTime clusterTime);
+
//
// All member variables are labeled with one of the following codes indicating the
// synchronization rules for accessing them.