Add fdbserver dependency to fdbbackup

This commit is contained in:
Meng Xu 2019-01-24 18:00:18 -08:00
parent e721a6a99e
commit 16f363b234
4 changed files with 16 additions and 4 deletions

View File

@ -34,6 +34,8 @@
#include "fdbclient/BlobStore.h"
#include "fdbclient/json_spirit/json_spirit_writer_template.h"
#include "fdbserver/RestoreInterface.h"
#include "fdbrpc/Platform.h"
#include <stdarg.h>
@ -67,8 +69,8 @@ using std::endl;
#include "versions.h"
#endif
#include "flow/SimpleOpt.h"
#include "fdbserver/RestoreInterface.h"
#include "flow/actorcompiler.h" // This must be the last #include.

View File

@ -64,6 +64,9 @@
<Lib>
<AdditionalDependencies>$(TargetDir)fdbclient.lib</AdditionalDependencies>
</Lib>
<Lib>
<AdditionalDependencies>$(TargetDir)fdbserver.lib</AdditionalDependencies>
</Lib>
<ClCompile>
<PreprocessorDefinitions>FDB_VT_VERSION="$(Version)$(PreReleaseDecoration)";FDB_VT_PACKAGE_NAME="$(PackageName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>

View File

@ -4341,7 +4341,7 @@ ACTOR static Future<ERestoreState> waitFastRestore(Database cx, Key tagName, boo
}
ACTOR Future<Version> fastRestore(Database cx, Key tagName, Key url, bool waitForComplete, Version targetVersion, bool verbose, KeyRange range, Key addPrefix, Key removePrefix) {
ACTOR static Future<Version> _fastRestore(Database cx, Key tagName, Key url, bool waitForComplete, Version targetVersion, bool verbose, KeyRange range, Key addPrefix, Key removePrefix) {
state Reference<IBackupContainer> bc = IBackupContainer::openContainer(url.toString());
state BackupDescription desc = wait(bc->describeBackup());
wait(desc.resolveVersionTimes(cx));
@ -4394,3 +4394,9 @@ ACTOR Future<Version> fastRestore(Database cx, Key tagName, Key url, bool waitFo
return targetVersion;
}
ACTOR Future<Version> fastRestore(Database cx, Standalone<StringRef> tagName, Standalone<StringRef> url, bool waitForComplete, long targetVersion, bool verbose, Standalone<KeyRangeRef> range, Standalone<StringRef> addPrefix, Standalone<StringRef> removePrefix) {
Version targetVersion = wait( _fastRestore(cx, tagName, url, waitForComplete, targetVersion, verbose, range, addPrefix, removePrefix) );
return targetVersion;
}

View File

@ -348,6 +348,7 @@ std::string getRoleStr(RestoreRole role);
////--- Interface functions
Future<Void> _restoreWorker(Database const& cx, LocalityData const& locality);
Future<Void> restoreWorker(Reference<ClusterConnectionFile> const& ccf, LocalityData const& locality);
Future<Version> fastRestore(Database const& cx, Key const& tagName, Key const& url, bool const& waitForComplete, Version const& targetVersion, bool const& verbose, KeyRange const& range, Key const& addPrefix, Key const& removePrefix);
//Future<Version> _fastRestore(Database const& cx, Key const& tagName, Key const& url, bool const& waitForComplete, Version const& targetVersion, bool const& verbose, KeyRange const& range, Key const& addPrefix, Key const& removePrefix);
Future<Version> fastRestore(Database const& cx, Standalone<StringRef> const& tagName, Standalone<StringRef> const& url, bool const& waitForComplete, long const& targetVersion, bool const& verbose, Standalone<KeyRangeRef> const& range, Standalone<StringRef> const& addPrefix, Standalone<StringRef> const& removePrefix);
#endif
#endif