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

Function GetSysCacheHashValue

src/backend/utils/cache/syscache.c:1651–1663  ·  view source on GitHub ↗

* GetSysCacheHashValue * * Get the hash value that would be used for a tuple in the specified cache * with the given search keys. * * The reason for exposing this as part of the API is that the hash value is * exposed in cache invalidation operations, so there are places outside the * catcache code that need to be able to compute the hash values. */

Source from the content-addressed store, hash-verified

1649 * catcache code that need to be able to compute the hash values.
1650 */
1651uint32
1652GetSysCacheHashValue(int cacheId,
1653 Datum key1,
1654 Datum key2,
1655 Datum key3,
1656 Datum key4)
1657{
1658 if (cacheId < 0 || cacheId >= SysCacheSize ||
1659 !PointerIsValid(SysCache[cacheId]))
1660 elog(ERROR, "invalid cache ID: %d", cacheId);
1661
1662 return GetCatCacheHashValue(SysCache[cacheId], key1, key2, key3, key4);
1663}
1664
1665/*
1666 * List-search interface

Callers

nothing calls this directly

Calls 1

GetCatCacheHashValueFunction · 0.85

Tested by

no test coverage detected