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

Method UpdateWriteSize

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

Source from the content-addressed store, hash-verified

323}
324
325void TupleCacheMgr::UpdateWriteSize(TupleCacheMgr::Handle* handle,
326 size_t charge) {
327 uint8_t* data = getHandleData(cache_.get(), handle);
328 // We can only adjust the cache charge while an entry is IN_PROGRESS
329 DCHECK(TupleCacheState::IN_PROGRESS == GetState(handle));
330 TupleCacheEntry* entry = reinterpret_cast<TupleCacheEntry*>(data);
331 int64_t diff = charge - entry->charge;
332 entry->charge = charge;
333 cache_->UpdateCharge(handle->cache_handle, charge);
334 if (diff < 0) {
335 DCHECK_LE(-diff, tuple_cache_outstanding_writes_bytes_->GetValue());
336 }
337 tuple_cache_outstanding_writes_bytes_->Increment(diff);
338}
339
340static Cache::UniquePendingHandle CreateEntry(
341 Cache* cache, const Slice& key, const string& path) {

Callers

nothing calls this directly

Calls 5

getHandleDataFunction · 0.85
getMethod · 0.65
UpdateChargeMethod · 0.45
GetValueMethod · 0.45
IncrementMethod · 0.45

Tested by

no test coverage detected