MCPcopy Create free account
hub / github.com/ByConity/ByConity / assertChecksum

Function assertChecksum

src/Storages/Distributed/DirectoryMonitor.cpp:143–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 }
142
143 void assertChecksum(CityHash_v1_0_2::uint128 expected, CityHash_v1_0_2::uint128 calculated)
144 {
145 if (expected != calculated)
146 {
147 String message = "Checksum of extra info doesn't match: corrupted data."
148 " Reference: " + getHexUIntLowercase(expected.first) + getHexUIntLowercase(expected.second)
149 + ". Actual: " + getHexUIntLowercase(calculated.first) + getHexUIntLowercase(calculated.second)
150 + ".";
151 throw Exception(message, ErrorCodes::CHECKSUM_DOESNT_MATCH);
152 }
153 }
154
155 struct DistributedHeader
156 {

Callers 1

readDistributedHeaderFunction · 0.85

Calls 2

getHexUIntLowercaseFunction · 0.85
ExceptionClass · 0.50

Tested by

no test coverage detected