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

Function serverKeysDecodeServerBegin

fdbclient/SystemData.cpp:448–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448std::pair<UID, Key> serverKeysDecodeServerBegin(const KeyRef& key) {
449 UID server_id;
450 BinaryReader rd(key.removePrefix(serverKeysPrefix), Unversioned());
451 rd >> server_id;
452 rd.readBytes(1); // skip "/"
453 const auto remainingBytes = rd.remainingBytes();
454 KeyRef ref = KeyRef(rd.arenaRead(remainingBytes), remainingBytes);
455 // std::cout << ref.size() << " " << ref.toString() << std::endl;
456 return std::make_pair(server_id, Key(ref));
457}
458
459bool serverHasKey(ValueRef storedValue) {
460 UID teamId;

Callers 1

updateServerShardsFunction · 0.85

Calls 7

UnversionedFunction · 0.85
KeyRefClass · 0.85
remainingBytesMethod · 0.80
KeyClass · 0.50
removePrefixMethod · 0.45
readBytesMethod · 0.45
arenaReadMethod · 0.45

Tested by

no test coverage detected