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

Function fetchTimes

fdbclient/BackupContainer.actor.cpp:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91Future<Void> fetchTimes(Reference<ReadYourWritesTransaction> tr, std::map<Version, int64_t>* pVersionTimeMap) {
92 std::vector<Future<Void>> futures;
93
94 // Resolve each version in the map,
95 for (auto& p : *pVersionTimeMap) {
96 futures.push_back(map(timeKeeperEpochsFromVersion(p.first, tr), [=](Optional<int64_t> t) {
97 if (t.present())
98 pVersionTimeMap->at(p.first) = t.get();
99 else
100 pVersionTimeMap->erase(p.first);
101 return Void();
102 }));
103 }
104
105 return waitForAll(futures);
106}
107
108Future<Void> BackupDescription::resolveVersionTimes(Database cx) {
109 // Populate map with versions needed

Callers 1

resolveVersionTimesMethod · 0.85

Calls 8

mapFunction · 0.85
waitForAllFunction · 0.85
atMethod · 0.80
getMethod · 0.65
VoidClass · 0.50
push_backMethod · 0.45
presentMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected