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

Function toRelativeRange

fdbclient/NativeAPI.actor.cpp:1414–1422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1412}
1413
1414KeyRangeRef toRelativeRange(KeyRangeRef range, KeyRef prefix) {
1415 if (prefix.empty()) {
1416 return range;
1417 } else {
1418 KeyRef begin = range.begin.startsWith(prefix) ? range.begin.removePrefix(prefix) : allKeys.begin;
1419 KeyRef end = range.end.startsWith(prefix) ? range.end.removePrefix(prefix) : allKeys.end;
1420 return KeyRangeRef(begin, end);
1421 }
1422}
1423
1424ACTOR Future<UID> getClusterId(Database db) {
1425 while (!db->clientInfo->get().clusterId.isValid()) {

Callers 3

getCachedLocationMethod · 0.85
getCachedLocationsMethod · 0.85
whenFunction · 0.85

Calls 4

KeyRangeRefClass · 0.50
emptyMethod · 0.45
startsWithMethod · 0.45
removePrefixMethod · 0.45

Tested by

no test coverage detected