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

Method updateHash

fdbserver/DiskQueue.actor.cpp:1093–1109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091 return XXH3_64bits(static_cast<const void*>(&magic), sizeof(Page) - sizeof(uint64_t));
1092 }
1093 void updateHash() {
1094 switch (diskQueueVersion()) {
1095 case DiskQueueVersion::V0: {
1096 hash = checksum_hashlittle2();
1097 return;
1098 }
1099 case DiskQueueVersion::V1: {
1100 hash32 = checksum_crc32c();
1101 return;
1102 }
1103 case DiskQueueVersion::V2:
1104 default: {
1105 hash64 = checksum_xxhash3();
1106 return;
1107 }
1108 }
1109 }
1110 bool checkHash() {
1111 switch (diskQueueVersion()) {
1112 case DiskQueueVersion::V0: {

Callers 2

commitMethod · 0.80
addEmptyPageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected