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

Method Lookup

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

Source from the content-addressed store, hash-verified

323
324template<Cache::EvictionPolicy policy>
325HandleBase* RLCacheShard<policy>::Lookup(const Slice& key,
326 uint32_t hash,
327 bool no_updates) {
328 DCHECK(initialized_);
329 RLHandle* e;
330 {
331 std::lock_guard<decltype(mutex_)> l(mutex_);
332 e = static_cast<RLHandle*>(table_.Lookup(key, hash));
333 if (e != nullptr) {
334 e->refs.fetch_add(1, std::memory_order_relaxed);
335 // If this is a no update lookup, skip the modifications.
336 if (!no_updates) RL_UpdateAfterLookup(e);
337 }
338 }
339
340 return e;
341}
342
343template<Cache::EvictionPolicy policy>
344void RLCacheShard<policy>::UpdateCharge(HandleBase* handle, size_t charge) {

Callers 3

TEST_FFunction · 0.45
DoQueriesMethod · 0.45
TEST_PFunction · 0.45

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.36
TEST_PFunction · 0.36