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

Method VerifyAndMoveDebugCache

be/src/exec/tuple-cache-node.cc:218–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218Status TupleCacheNode::VerifyAndMoveDebugCache(RuntimeState* state) {
219 DCHECK(debug_dump_text_writer_ref_ != nullptr);
220 DCHECK(ExecEnv::GetInstance()->tuple_cache_mgr()->DebugDumpEnabled());
221 DCHECK(TupleCacheVerificationEnabled(state));
222 if (debug_dump_text_writer_->IsEmpty()) {
223 return Status::OK();
224 }
225 string ref_file_path = debug_dump_text_writer_ref_->GetPath();
226 string dump_file_path = debug_dump_text_writer_->GetPath();
227 bool passed = false;
228
229 DCHECK(!ref_file_path.empty());
230 DCHECK(!dump_file_path.empty());
231
232 VLOG_FILE << "Verify debug tuple cache file ref_file_path: " << ref_file_path
233 << " and dump_file_path: " << dump_file_path
234 << " with cache key:" << combined_key_;
235
236 // Fast path to verify the cache.
237 Status verify_status =
238 TupleTextFileUtil::VerifyDebugDumpCache(dump_file_path, ref_file_path, &passed);
239 if (verify_status.ok() && !passed) {
240 // Slow path to compare all rows in an order-insensitive way if the files are not the
241 // same.
242 verify_status = TupleTextFileUtil::VerifyRows(dump_file_path, ref_file_path);
243 passed = verify_status.ok();
244 }
245
246 // Move or clear the file after verification.
247 MoveDebugCache(passed, debug_dump_text_writer_ref_);
248 MoveDebugCache(passed, debug_dump_text_writer_);
249 return verify_status;
250}
251
252// Helper function to generate the unique id based on fragment instance id and node id.
253static string GenerateFragmentNodeId(

Callers

nothing calls this directly

Calls 9

OKFunction · 0.85
MoveDebugCacheFunction · 0.85
DebugDumpEnabledMethod · 0.80
tuple_cache_mgrMethod · 0.80
IsEmptyMethod · 0.45
GetPathMethod · 0.45
emptyMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected