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

Function serializeIndexBlock

fdbclient/BlobGranuleFiles.cpp:657–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655// ObjectWriter/flatbuffers uses fixed size integers instead of variable size.
656
657Value serializeIndexBlock(Standalone<IndexedBlobGranuleFile>& file, Optional<BlobGranuleCipherKeysCtx> cipherKeysCtx) {
658 file.indexBlockRef.finalize(cipherKeysCtx, file.arena());
659
660 Value serialized = ObjectWriter::toValue(file, IncludeVersion(ProtocolVersion::withBlobGranuleFile()));
661 file.chunkStartOffset = serialized.contents().size();
662
663 if (BG_ENCRYPT_COMPRESS_DEBUG) {
664 TraceEvent(SevDebug, "SerializeIndexBlock").detail("StartOffset", file.chunkStartOffset);
665 }
666
667 return ObjectWriter::toValue(file, IncludeVersion(ProtocolVersion::withBlobGranuleFile()));
668}
669
670Value serializeFileFromChunks(Standalone<IndexedBlobGranuleFile>& file,
671 Optional<BlobGranuleCipherKeysCtx> cipherKeysCtx,

Callers 1

serializeFileFromChunksFunction · 0.85

Calls 5

IncludeVersionFunction · 0.85
TraceEventClass · 0.85
detailMethod · 0.80
finalizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected