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

Method EnforceProtectedCapacity

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

Source from the content-addressed store, hash-verified

547}
548
549void LIRSCacheShard::EnforceProtectedCapacity(LIRSThreadState* tstate) {
550 while (protected_usage_ > protected_capacity_) {
551 DCHECK(!recency_list_.empty());
552 // Get pointer to oldest entry and remove it
553 LIRSHandle* oldest = &recency_list_.front();
554 // The oldest entry must be protected (i.e. the recency list must be trimmed)
555 DCHECK_EQ(oldest->state(), PROTECTED);
556 ProtectedToUnprotected(tstate, oldest);
557 }
558}
559
560void LIRSCacheShard::TrimRecencyList(LIRSThreadState* tstate) {
561 // This function maintains the invariant that the oldest entry in the list must be

Callers

nothing calls this directly

Calls 3

frontMethod · 0.80
emptyMethod · 0.45
stateMethod · 0.45

Tested by

no test coverage detected