diff options
author | Judah Schvimer <judah@mongodb.com> | 2018-03-12 14:47:40 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2018-03-12 14:47:40 -0400 |
commit | b1102c617e04ff751d702435f9d4521727e579e1 (patch) | |
tree | 0878af2c87cc855f833393c4323b623e6e1b3e31 /src/mongo/db/storage/storage_engine.h | |
parent | ccaad4fb968b8a21a697c00362de5bb618bbb184 (diff) | |
download | mongo-b1102c617e04ff751d702435f9d4521727e579e1.tar.gz |
SERVER-33292 Have storage dictate where replication recovery should begin playing oplog from
Diffstat (limited to 'src/mongo/db/storage/storage_engine.h')
-rw-r--r-- | src/mongo/db/storage/storage_engine.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mongo/db/storage/storage_engine.h b/src/mongo/db/storage/storage_engine.h index cd881198f03..c3b02246013 100644 --- a/src/mongo/db/storage/storage_engine.h +++ b/src/mongo/db/storage/storage_engine.h @@ -320,8 +320,9 @@ public: * used should be one provided by StorageEngine::setStableTimestamp(). * * The "local" database is exempt and should not roll back any state except for - * "local.replset.minvalid" and "local.replset.checkpointTimestamp" which must roll back to - * the last stable timestamp. + * "local.replset.minvalid" which must roll back to the last stable timestamp. + * + * If successful, returns the timestamp that the storage engine recovered to. * * fasserts if StorageEngine::supportsRecoverToStableTimestamp() would return * false. Returns a bad status if there is no stable timestamp to recover to. @@ -329,11 +330,20 @@ public: * It is illegal to call this concurrently with `setStableTimestamp` or * `setInitialDataTimestamp`. */ - virtual Status recoverToStableTimestamp() { + virtual StatusWith<Timestamp> recoverToStableTimestamp() { fassertFailed(40547); } /** + * Returns the stable timestamp that the storage engine recovered to on startup. If the + * recovery point was not stable, returns "none". + * fasserts if StorageEngine::supportsRecoverToStableTimestamp() would return false. + */ + virtual boost::optional<Timestamp> getRecoveryTimestamp() const { + MONGO_UNREACHABLE; + } + + /** * Sets the highest timestamp at which the storage engine is allowed to take a checkpoint. * This timestamp can never decrease, and thus should be a timestamp that can never roll back. */ |