diff --git a/fdbclient/BackupAgent.h b/fdbclient/BackupAgent.h index 323516525c..1134aed5cb 100644 --- a/fdbclient/BackupAgent.h +++ b/fdbclient/BackupAgent.h @@ -277,6 +277,8 @@ public: static std::string getDataFilename(Version version, int64_t size, int blockSize); static std::string getLogFilename(Version beginVer, Version endVer, int64_t size, int blockSize); + static const Key keyLastRestorable; + Future getTaskCount(Reference tr) { return taskBucket->getTaskCount(tr); } Future getTaskCount(Database cx) { return taskBucket->getTaskCount(cx); } Future watchTaskCount(Reference tr) { return taskBucket->watchTaskCount(tr); } diff --git a/fdbclient/FileBackupAgent.actor.cpp b/fdbclient/FileBackupAgent.actor.cpp index 48bee1e541..c8230bbac8 100644 --- a/fdbclient/FileBackupAgent.actor.cpp +++ b/fdbclient/FileBackupAgent.actor.cpp @@ -35,6 +35,8 @@ #include #include +const Key FileBackupAgent::keyLastRestorable = LiteralStringRef("last_restorable"); + // For convenience typedef FileBackupAgent::ERestoreState ERestoreState; @@ -304,6 +306,7 @@ FileBackupAgent::FileBackupAgent() : subspace(Subspace(fileBackupPrefixRange.begin)) // The other subspaces have logUID -> value , config(subspace.get(BackupAgentBase::keyConfig)) + , lastRestorable(subspace.get(FileBackupAgent::keyLastRestorable)) , taskBucket(new TaskBucket(subspace.get(BackupAgentBase::keyTasks), true, false, true)) , futureBucket(new FutureBucket(subspace.get(BackupAgentBase::keyFutures), true, true)) {