| 370 | } |
| 371 | |
| 372 | Future<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 | |
| 394 | ACTOR Future<std::vector<UID>> addReadWriteDestinations(KeyRangeRef shard, |
| 395 | std::vector<StorageServerInterface> srcInterfs, |
no test coverage detected