parent
af34b25cd1
commit
e516a20c43
|
@ -3735,7 +3735,7 @@ int main(int argc, char* argv[]) {
|
|||
f = stopAfter(
|
||||
map(ba.abortRestore(db, KeyRef(tagName)), [tagName](FileBackupAgent::ERestoreState s) -> Void {
|
||||
printf("RESTORE_ABORT Tag: %s State: %s\n", tagName.c_str(),
|
||||
FileBackupAgent::restoreStateText(s).c_str());
|
||||
FileBackupAgent::restoreStateText(s).toString().c_str());
|
||||
return Void();
|
||||
}));
|
||||
break;
|
||||
|
|
|
@ -273,7 +273,7 @@ public:
|
|||
/** RESTORE **/
|
||||
|
||||
enum ERestoreState { UNITIALIZED = 0, QUEUED = 1, STARTING = 2, RUNNING = 3, COMPLETED = 4, ABORTED = 5 };
|
||||
static std::string restoreStateText(ERestoreState id);
|
||||
static StringRef restoreStateText(ERestoreState id);
|
||||
|
||||
// parallel restore
|
||||
Future<Void> parallelRestoreFinish(Database cx, UID randomUID, bool unlockDB = true);
|
||||
|
|
|
@ -87,22 +87,15 @@ const Key FileBackupAgent::keyLastRestorable = LiteralStringRef("last_restorable
|
|||
// For convenience
|
||||
typedef FileBackupAgent::ERestoreState ERestoreState;
|
||||
|
||||
std::string FileBackupAgent::restoreStateText(ERestoreState id) {
|
||||
StringRef FileBackupAgent::restoreStateText(ERestoreState id) {
|
||||
switch(id) {
|
||||
case ERestoreState::UNITIALIZED:
|
||||
return "unitialized";
|
||||
case ERestoreState::QUEUED:
|
||||
return "queued";
|
||||
case ERestoreState::STARTING:
|
||||
return "starting";
|
||||
case ERestoreState::RUNNING:
|
||||
return "running";
|
||||
case ERestoreState::COMPLETED:
|
||||
return "completed";
|
||||
case ERestoreState::ABORTED:
|
||||
return "aborted";
|
||||
default:
|
||||
return "Unknown";
|
||||
case ERestoreState::UNITIALIZED: return LiteralStringRef("unitialized");
|
||||
case ERestoreState::QUEUED: return LiteralStringRef("queued");
|
||||
case ERestoreState::STARTING: return LiteralStringRef("starting");
|
||||
case ERestoreState::RUNNING: return LiteralStringRef("running");
|
||||
case ERestoreState::COMPLETED: return LiteralStringRef("completed");
|
||||
case ERestoreState::ABORTED: return LiteralStringRef("aborted");
|
||||
default: return LiteralStringRef("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3975,7 +3968,7 @@ public:
|
|||
if(!current.present()) {
|
||||
if(verbose)
|
||||
printf("waitRestore: Tag: %s State: %s\n", tagName.toString().c_str(),
|
||||
FileBackupAgent::restoreStateText(ERestoreState::UNITIALIZED).c_str());
|
||||
FileBackupAgent::restoreStateText(ERestoreState::UNITIALIZED).toString().c_str());
|
||||
return ERestoreState::UNITIALIZED;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
return defaultValue;
|
||||
return get(task);
|
||||
}
|
||||
Key key;
|
||||
StringRef key;
|
||||
};
|
||||
|
||||
struct ReservedTaskParams {
|
||||
|
|
|
@ -286,7 +286,7 @@ struct GlobalState
|
|||
serializer(ar, CLoad, CRun, CDelta, CId, COlIID);
|
||||
}
|
||||
|
||||
Key key() const { return LiteralStringRef("GlobalState"); }
|
||||
StringRef key() const { return LiteralStringRef("GlobalState"); }
|
||||
};
|
||||
|
||||
const std::vector<std::string> syllables = {
|
||||
|
|
Loading…
Reference in New Issue