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

Function removeOldDestinations

fdbserver/MoveKeys.actor.cpp:372–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372Future<Void> removeOldDestinations(Reference<ReadYourWritesTransaction> tr,
373 UID oldDest,
374 VectorRef<KeyRangeRef> shards,
375 KeyRangeRef currentKeys) {
376 KeyRef beginKey = currentKeys.begin;
377
378 std::vector<Future<Void>> actors;
379 for (int i = 0; i < shards.size(); i++) {
380 if (beginKey < shards[i].begin)
381 actors.push_back(krmSetRangeCoalescing(
382 tr, serverKeysPrefixFor(oldDest), KeyRangeRef(beginKey, shards[i].begin), allKeys, serverKeysFalse));
383
384 beginKey = shards[i].end;
385 }
386
387 if (beginKey < currentKeys.end)
388 actors.push_back(krmSetRangeCoalescing(
389 tr, serverKeysPrefixFor(oldDest), KeyRangeRef(beginKey, currentKeys.end), allKeys, serverKeysFalse));
390
391 return waitForAll(actors);
392}
393
394ACTOR Future<std::vector<UID>> addReadWriteDestinations(KeyRangeRef shard,
395 std::vector<StorageServerInterface> srcInterfs,

Callers 1

Calls 6

krmSetRangeCoalescingFunction · 0.85
serverKeysPrefixForFunction · 0.85
waitForAllFunction · 0.85
KeyRangeRefClass · 0.50
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected