Fail with correct error code in case of abort or discontinue of
non-existing backups.
This commit is contained in:
parent
2007f3799f
commit
360b777b78
|
@ -1145,6 +1145,7 @@ namespace fileBackup {
|
|||
// Enable the stop key
|
||||
state Version readVersion = wait(tr->getReadVersion());
|
||||
config.stopVersion().set(tr, readVersion);
|
||||
TraceEvent(SevInfo, "FBA_setStopVersion").detail("stopVersion", readVersion);
|
||||
|
||||
Void _ = wait(taskBucket->finish(tr, task));
|
||||
|
||||
|
@ -1755,6 +1756,8 @@ namespace fileBackup {
|
|||
Void _ = wait(mf->sync());
|
||||
|
||||
std::string fileName = format("kvmanifest,%lld,%lld,%lld,%s", minVer, maxVer, totalBytes, g_random->randomUniqueID().toString().c_str());
|
||||
|
||||
TraceEvent(SevInfo, "FBA_KVManifest").detail("fileName", fileName.c_str());
|
||||
Void _ = wait(bc->renameFile(tempFile, fileName));
|
||||
|
||||
return Void();
|
||||
|
@ -3429,7 +3432,7 @@ public:
|
|||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
|
||||
state KeyBackedTag tag = makeBackupTag(tagName.toString());
|
||||
state UidAndAbortedFlagT current = wait(tag.getOrThrow(tr));
|
||||
state UidAndAbortedFlagT current = wait(tag.getOrThrow(tr, false, backup_unneeded()));
|
||||
state BackupConfig config(current.first);
|
||||
state EBackupState status = wait(config.stateEnum().getD(tr, EBackupState::STATE_NEVERRAN));
|
||||
|
||||
|
@ -3457,7 +3460,7 @@ public:
|
|||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
|
||||
state KeyBackedTag tag = makeBackupTag(tagName);
|
||||
state UidAndAbortedFlagT current = wait(tag.getOrThrow(tr));
|
||||
state UidAndAbortedFlagT current = wait(tag.getOrThrow(tr, false, backup_unneeded()));
|
||||
|
||||
state BackupConfig config(current.first);
|
||||
EBackupState status = wait(config.stateEnum().getD(tr, EBackupState::STATE_NEVERRAN));
|
||||
|
|
|
@ -123,7 +123,7 @@ public:
|
|||
auto backtrace = platform::get_backtrace();
|
||||
return map(get(tr, snapshot), [=](Optional<T> val) -> T {
|
||||
if (!val.present()) {
|
||||
TraceEvent(SevError, "KeyBackedProperty_keyNotFound")
|
||||
TraceEvent(SevInfo, "KeyBackedProperty_keyNotFound")
|
||||
.detail("key", printable(keyCopy))
|
||||
.detail("err", err.code())
|
||||
.detail("parentTrace", backtrace.c_str());
|
||||
|
|
|
@ -162,7 +162,7 @@ struct BackupAndRestoreCorrectnessWorkload : TestWorkload {
|
|||
state int resultWait = wait(backupAgent->waitBackup(cx, backupTag.tagName, false));
|
||||
UidAndAbortedFlagT uidFlag = wait(backupTag.getOrThrow(cx));
|
||||
state UID logUid = uidFlag.first;
|
||||
state std::string lastBackupContainer = wait(BackupConfig(logUid).backupContainer().getOrThrow(cx));
|
||||
state std::string lastBackupContainer = wait(BackupConfig(logUid).backupContainer().getOrThrow(cx, false, backup_unneeded()));
|
||||
|
||||
state std::string restorableFile = joinPath(lastBackupContainer, "restorable");
|
||||
TraceEvent("BARW_lastBackupContainer", randomID).detail("backupTag", printable(tag)).detail("lastBackupContainer", lastBackupContainer)
|
||||
|
|
Loading…
Reference in New Issue