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

Method AbortWrite

be/src/runtime/tuple-cache-mgr.cc:454–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454void TupleCacheMgr::AbortWrite(UniqueHandle handle, bool tombstone) {
455 DCHECK(enabled_);
456 DCHECK(handle != nullptr && handle->cache_handle != nullptr);
457 DCHECK(handle->is_writer);
458 if (tombstone) {
459 VLOG_FILE << "Tuple Cache: Tombstone " << GetPath(handle);
460 tuple_cache_tombstones_in_use_->Increment(1);
461 // We update the write size to 0 to remove the existing cache charge
462 // (and decrement the outstanding writes counter)
463 UpdateWriteSize(handle.get(), 0);
464 CHECK(UpdateState(handle.get(),
465 TupleCacheState::IN_PROGRESS, TupleCacheState::TOMBSTONE));
466 // We want the tombstone cache entry to have a base charge, so set that now
467 // (without counting towards the outstanding writes).
468 cache_->UpdateCharge(handle->cache_handle, handle->base_charge);
469 } else {
470 // Remove the cache entry. Leaves state IN_PROGRESS so entry won't be reused until
471 // successfully evicted.
472 DCHECK(TupleCacheState::IN_PROGRESS == GetState(handle.get()));
473 cache_->Erase(cache_->Key(handle->cache_handle));
474 }
475}
476
477Status TupleCacheMgr::RequestWriteSize(UniqueHandle* handle, size_t new_size) {
478 // The handle better be from a writer

Callers 4

OpenMethod · 0.80
GetNextMethod · 0.80
CloseMethod · 0.80
TEST_FFunction · 0.80

Calls 5

getMethod · 0.65
IncrementMethod · 0.45
UpdateChargeMethod · 0.45
EraseMethod · 0.45
KeyMethod · 0.45

Tested by 1

TEST_FFunction · 0.64