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

Function AddRelcacheInvalidationMessage

src/backend/utils/cache/inval.c:417–442  ·  view source on GitHub ↗

* Add a relcache inval entry */

Source from the content-addressed store, hash-verified

415 * Add a relcache inval entry
416 */
417static void
418AddRelcacheInvalidationMessage(InvalidationListHeader *hdr,
419 Oid dbId, Oid relId)
420{
421 SharedInvalidationMessage msg;
422
423 /*
424 * Don't add a duplicate item. We assume dbId need not be checked because
425 * it will never change. InvalidOid for relId means all relations so we
426 * don't need to add individual ones when it is present.
427 */
428 ProcessMessageList(hdr->rclist,
429 if (msg->rc.id == SHAREDINVALRELCACHE_ID &&
430 (msg->rc.relId == relId ||
431 msg->rc.relId == InvalidOid))
432 return);
433
434 /* OK, add the item */
435 msg.rc.id = SHAREDINVALRELCACHE_ID;
436 msg.rc.dbId = dbId;
437 msg.rc.relId = relId;
438 /* check AddCatcacheInvalidationMessage() for an explanation */
439 VALGRIND_MAKE_MEM_DEFINED(&msg, sizeof(msg));
440
441 AddInvalidationMessage(&hdr->rclist, &msg);
442}
443
444/*
445 * Add a snapshot inval entry

Callers 1

Calls 2

AddInvalidationMessageFunction · 0.85
ifFunction · 0.50

Tested by

no test coverage detected