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

Function decodeFailedLocalityKey

fdbclient/SystemData.cpp:905–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903const KeyRef failedLocalityPrefix = failedLocalityKeys.begin;
904const KeyRef failedLocalityVersionKey = LiteralStringRef("\xff/conf/failed_locality");
905std::string decodeFailedLocalityKey(KeyRef const& key) {
906 ASSERT(key.startsWith(failedLocalityPrefix));
907 return key.removePrefix(failedLocalityPrefix).toString();
908}
909std::string encodeFailedLocalityKey(std::string const& locality) {
910 return failedLocalityPrefix.toString() + locality;
911}

Calls 3

startsWithMethod · 0.45
toStringMethod · 0.45
removePrefixMethod · 0.45

Tested by

no test coverage detected