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

Method Erase

be/src/util/cache/rl-cache.cc:420–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418
419template<Cache::EvictionPolicy policy>
420void RLCacheShard<policy>::Erase(const Slice& key, uint32_t hash) {
421 DCHECK(initialized_);
422 RLHandle* e;
423 bool last_reference = false;
424 {
425 std::lock_guard<decltype(mutex_)> l(mutex_);
426 e = static_cast<RLHandle*>(table_.Remove(key, hash));
427 if (e != nullptr) {
428 RL_Remove(e);
429 last_reference = Unref(e);
430 }
431 }
432 // mutex not held here
433 // last_reference will only be true if e != NULL
434 if (last_reference) {
435 FreeEntry(e);
436 }
437}
438
439template<Cache::EvictionPolicy policy>
440size_t RLCacheShard<policy>::Invalidate(const Cache::InvalidationControl& ctl) {

Callers

nothing calls this directly

Calls 1

RemoveMethod · 0.45

Tested by

no test coverage detected