MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / find_cached_threadsafe

Method find_cached_threadsafe

src/snapshot.cpp:478–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478dict_iter redisDbPersistentData::find_cached_threadsafe(const char *key) const
479{
480 dict *dictTombstone;
481 __atomic_load(&m_pdictTombstone, &dictTombstone, __ATOMIC_ACQUIRE);
482 dictEntry *de = dictFind(m_pdict, key);
483 if (de == nullptr && m_pdbSnapshot != nullptr && dictFind(dictTombstone, key) == nullptr)
484 {
485 auto itr = m_pdbSnapshot->find_cached_threadsafe(key);
486 if (itr != nullptr)
487 return itr;
488 }
489 return dict_iter(m_pdict, de);
490}
491
492struct scan_callback_data
493{

Callers 11

prefetchKeysAsyncMethod · 0.95
lookupKeyConstFunction · 0.80
lookupKeyReadFunction · 0.80
syncDeleteMethod · 0.80
insertMethod · 0.80
ensureMethod · 0.80
asyncDeleteMethod · 0.80
freeTombstoneObjectsMethod · 0.80
endSnapshotMethod · 0.80

Calls 2

dict_iterClass · 0.85
dictFindFunction · 0.70

Tested by

no test coverage detected