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

Function blobGranuleFileKeyFor

fdbclient/SystemData.cpp:1353–1361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1351const uint8_t BG_FILE_TYPE_SNAPSHOT = 'S';
1352
1353const Key blobGranuleFileKeyFor(UID granuleID, Version fileVersion, uint8_t fileType) {
1354 ASSERT(fileType == 'D' || fileType == 'S');
1355 BinaryWriter wr(AssumeVersion(ProtocolVersion::withBlobGranule()));
1356 wr.serializeBytes(blobGranuleFileKeys.begin);
1357 wr << granuleID;
1358 wr << bigEndian64(fileVersion);
1359 wr << fileType;
1360 return wr.toValue();
1361}
1362
1363std::tuple<UID, Version, uint8_t> decodeBlobGranuleFileKey(KeyRef const& key) {
1364 UID granuleID;

Calls 3

AssumeVersionFunction · 0.85
serializeBytesMethod · 0.45
toValueMethod · 0.45

Tested by

no test coverage detected