MCPcopy Create free account
hub / github.com/apache/cloudberry / EventCacheLookup

Function EventCacheLookup

src/backend/utils/cache/evtcache.c:63–72  ·  view source on GitHub ↗

* Search the event cache by trigger event. * * Note that the caller had better copy any data it wants to keep around * across any operation that might touch a system catalog into some other * memory context, since a cache reset could blow the return value away. */

Source from the content-addressed store, hash-verified

61 * memory context, since a cache reset could blow the return value away.
62 */
63List *
64EventCacheLookup(EventTriggerEvent event)
65{
66 EventTriggerCacheEntry *entry;
67
68 if (EventTriggerCacheState != ETCS_VALID)
69 BuildEventTriggerCache();
70 entry = hash_search(EventTriggerCache, &event, HASH_FIND, NULL);
71 return entry != NULL ? entry->triggerlist : NIL;
72}
73
74/*
75 * Rebuild the event trigger cache.

Callers 2

EventTriggerCommonSetupFunction · 0.85

Calls 2

BuildEventTriggerCacheFunction · 0.85
hash_searchFunction · 0.85

Tested by

no test coverage detected