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

Function _execute

fdbclient/DatabaseBackupAgent.actor.cpp:1694–1718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1692 static constexpr uint32_t version = 1;
1693
1694 ACTOR static Future<Void> _execute(Database cx,
1695 Reference<TaskBucket> taskBucket,
1696 Reference<FutureBucket> futureBucket,
1697 Reference<Task> task) {
1698 state DatabaseBackupAgent srcDrAgent(taskBucket->src);
1699 state Reference<ReadYourWritesTransaction> tr(new ReadYourWritesTransaction(cx));
1700 state Key tagNameKey;
1701
1702 loop {
1703 try {
1704 tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
1705 tr->setOption(FDBTransactionOptions::LOCK_AWARE);
1706 Key tagPath = srcDrAgent.states.get(task->params[DatabaseBackupAgent::keyConfigLogUid])
1707 .pack(BackupAgentBase::keyConfigBackupTag);
1708 Optional<Key> tagName = wait(tr->get(tagPath));
1709 if (!tagName.present()) {
1710 return Void();
1711 }
1712
1713 tagNameKey = tagName.get();
1714 break;
1715 } catch (Error& e) {
1716 wait(tr->onError(e));
1717 }
1718 }
1719
1720 TraceEvent("DBA_AbortOldBackup").detail("TagName", tagNameKey.printable());
1721 wait(srcDrAgent.abortBackup(cx, tagNameKey, PartialBackup::False, AbortOldBackup::True));

Callers 9

executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeFunction · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeFunction · 0.85

Calls 6

onErrorMethod · 0.65
setOptionMethod · 0.65
getMethod · 0.65
VoidClass · 0.50
packMethod · 0.45
presentMethod · 0.45

Tested by

no test coverage detected