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

Method checkHash

fdbserver/DiskQueue.actor.cpp:1110–1124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1108 }
1109 }
1110 bool checkHash() {
1111 switch (diskQueueVersion()) {
1112 case DiskQueueVersion::V0: {
1113 return hash == checksum_hashlittle2();
1114 }
1115 case DiskQueueVersion::V1: {
1116 return hash32 == checksum_crc32c();
1117 }
1118 case DiskQueueVersion::V2: {
1119 return hash64 == checksum_xxhash3();
1120 }
1121 default:
1122 return false;
1123 }
1124 }
1125 void zeroPad() { memset(payload + payloadSize, 0, maxPayload - payloadSize); }
1126 };
1127 static_assert(sizeof(Page) == _PAGE_SIZE, "Page must be 4k");

Callers 4

readMethod · 0.80
DiskQueueClass · 0.80
findPhysicalLocationFunction · 0.80
comparePagesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected