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

Method EnforceCapacity

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

Source from the content-addressed store, hash-verified

301
302template<Cache::EvictionPolicy policy>
303void RLCacheShard<policy>::EnforceCapacity(RLThreadState* tstate) {
304 while (usage_ > capacity_ && rl_.next != &rl_) {
305 RLHandle* old = rl_.next;
306 RL_Remove(old);
307 table_.Remove(old->key(), old->hash());
308 if (Unref(old)) {
309 old->next = tstate->to_remove_head;
310 tstate->to_remove_head = old;
311 }
312 }
313}
314
315template<Cache::EvictionPolicy policy>
316void RLCacheShard<policy>::CleanupThreadState(RLThreadState* tstate) {

Callers

nothing calls this directly

Calls 3

hashMethod · 0.80
RemoveMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected