From a3547120b5ee06bfb495426f476a73703d089cc2 Mon Sep 17 00:00:00 2001 From: Eric Milkie Date: Mon, 28 Aug 2017 13:01:44 -0400 Subject: SERVER-30865 Synchronize a node's initial sync writes to the oplog with its lastApplied value --- src/mongo/db/repl/storage_interface.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mongo/db/repl/storage_interface.h') diff --git a/src/mongo/db/repl/storage_interface.h b/src/mongo/db/repl/storage_interface.h index 27507e790e8..840b40e2c16 100644 --- a/src/mongo/db/repl/storage_interface.h +++ b/src/mongo/db/repl/storage_interface.h @@ -305,6 +305,13 @@ public: * The 'stable' timestamp is set by calling StorageInterface::setStableTimestamp. */ virtual Status recoverToStableTimestamp(ServiceContext* serviceCtx) = 0; + + /** + * Waits for oplog writes to be visible in the oplog. + * This function is used to ensure tests do not fail due to initial sync receiving an empty + * batch. + */ + virtual void waitForAllEarlierOplogWritesToBeVisible(OperationContext* opCtx) = 0; }; } // namespace repl -- cgit v1.2.1