MCPcopy Create free account
hub / github.com/apache/impala / VerifyChecksum

Method VerifyChecksum

be/src/runtime/io/data-cache.cc:1213–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1211}
1212
1213bool DataCache::Partition::VerifyChecksum(const string& ops_name, const CacheEntry& entry,
1214 const uint8_t* buffer, int64_t buffer_len) {
1215 DCHECK(FLAGS_data_cache_checksum);
1216 DCHECK_GE(buffer_len, entry.len());
1217 int64_t checksum = Checksum(buffer, entry.len());
1218 if (UNLIKELY(checksum != entry.checksum())) {
1219 LOG(DFATAL) << Substitute("Checksum mismatch during $0 for file $1 "
1220 "offset: $2 len: $3 buffer len: $4. Expected $5, Got $6.", ops_name,
1221 entry.file()->path(), entry.offset(), entry.len(), buffer_len, entry.checksum(),
1222 checksum);
1223 return false;
1224 }
1225 return true;
1226}
1227
1228DataCache::DataCache(
1229 std::string config, int32_t num_async_write_threads, bool trace_replay)

Callers

nothing calls this directly

Calls 6

SubstituteFunction · 0.85
checksumMethod · 0.80
pathMethod · 0.80
lenMethod · 0.45
fileMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected