MCPcopy Create free account
hub / github.com/apple/foundationdb / getFullStatus_impl

Method getFullStatus_impl

fdbclient/FileBackupAgent.actor.cpp:408–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408ACTOR Future<std::string> RestoreConfig::getFullStatus_impl(RestoreConfig restore,
409 Reference<ReadYourWritesTransaction> tr) {
410 tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
411 tr->setOption(FDBTransactionOptions::LOCK_AWARE);
412
413 state Future<std::vector<KeyRange>> ranges = restore.getRestoreRangesOrDefault(tr);
414 state Future<Key> addPrefix = restore.addPrefix().getD(tr);
415 state Future<Key> removePrefix = restore.removePrefix().getD(tr);
416 state Future<Key> url = restore.sourceContainerURL().getD(tr);
417 state Future<Version> restoreVersion = restore.restoreVersion().getD(tr);
418 state Future<std::string> progress = restore.getProgress(tr);
419
420 // restore might no longer be valid after the first wait so make sure it is not needed anymore.
421 wait(success(ranges) && success(addPrefix) && success(removePrefix) && success(url) && success(restoreVersion) &&
422 success(progress));
423
424 std::string returnStr;
425 returnStr = format("%s URL: %s", progress.get().c_str(), url.get().toString().c_str());
426 for (auto& range : ranges.get()) {
427 returnStr += format(" Range: '%s'-'%s'", printable(range.begin).c_str(), printable(range.end).c_str());
428 }
429 returnStr += format(" AddPrefix: '%s' RemovePrefix: '%s' Version: %lld",
430 printable(addPrefix.get()).c_str(),
431 printable(removePrefix.get()).c_str(),
432 restoreVersion.get());
433 return returnStr;
434}
435
436FileBackupAgent::FileBackupAgent()
437 : subspace(Subspace(fileBackupPrefixRange.begin))

Callers

nothing calls this directly

Calls 13

printableFunction · 0.70
setOptionMethod · 0.65
getMethod · 0.65
formatFunction · 0.50
getDMethod · 0.45
addPrefixMethod · 0.45
removePrefixMethod · 0.45
sourceContainerURLMethod · 0.45
restoreVersionMethod · 0.45
getProgressMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected