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

Method Erase

be/src/util/cache/lirs-cache.cc:1121–1136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1119}
1120
1121void LIRSCacheShard::Erase(const Slice& key, uint32_t hash) {
1122 DCHECK(initialized_);
1123 LIRSThreadState tstate;
1124 {
1125 std::lock_guard<MutexType> l(mutex_);
1126 LIRSHandle* e = static_cast<LIRSHandle*>(table_.Remove(key, hash));
1127 if (e != nullptr) {
1128 // Transition from any state to UNINITIALIZED. There may be external references, so
1129 // this might not actually free it immediately.
1130 ToUninitialized(&tstate, e);
1131 }
1132 }
1133
1134 // This happens when not holding the mutex for performance reasons.
1135 CleanupThreadState(&tstate);
1136}
1137
1138size_t LIRSCacheShard::Invalidate(const Cache::InvalidationControl& ctl) {
1139 DCHECK(initialized_);

Callers

nothing calls this directly

Calls 1

RemoveMethod · 0.45

Tested by

no test coverage detected