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

Method UninitializedToProtected

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

Source from the content-addressed store, hash-verified

752}
753
754void LIRSCacheShard::UninitializedToProtected(LIRSThreadState* tstate, LIRSHandle* e) {
755 DCHECK(!e->unprotected_tombstone_list_hook_.is_linked());
756 DCHECK(!e->recency_list_hook_.is_linked());
757 e->set_state(UNINITIALIZED, PROTECTED);
758 HandleBase* existing = table_.Insert(e);
759 DCHECK(existing == nullptr);
760 recency_list_.push_back(*e);
761 // List operations happen before changes to the counts/usage
762 ++num_protected_;
763 protected_usage_ += e->charge();
764 EnforceProtectedCapacity(tstate);
765}
766
767bool LIRSCacheShard::UninitializedToUnprotected(LIRSThreadState* tstate, LIRSHandle* e) {
768 DCHECK(!e->unprotected_tombstone_list_hook_.is_linked());

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.80
chargeMethod · 0.80
set_stateMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected