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

Function AddSnapshotInvalidationMessage

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

* Add a snapshot inval entry */

Source from the content-addressed store, hash-verified

445 * Add a snapshot inval entry
446 */
447static void
448AddSnapshotInvalidationMessage(InvalidationListHeader *hdr,
449 Oid dbId, Oid relId)
450{
451 SharedInvalidationMessage msg;
452
453 /* Don't add a duplicate item */
454 /* We assume dbId need not be checked because it will never change */
455 ProcessMessageList(hdr->rclist,
456 if (msg->sn.id == SHAREDINVALSNAPSHOT_ID &&
457 msg->sn.relId == relId)
458 return);
459
460 /* OK, add the item */
461 msg.sn.id = SHAREDINVALSNAPSHOT_ID;
462 msg.sn.dbId = dbId;
463 msg.sn.relId = relId;
464 /* check AddCatcacheInvalidationMessage() for an explanation */
465 VALGRIND_MAKE_MEM_DEFINED(&msg, sizeof(msg));
466
467 AddInvalidationMessage(&hdr->rclist, &msg);
468}
469
470/*
471 * Append one list of invalidation messages to another, resetting

Callers 1

Calls 2

AddInvalidationMessageFunction · 0.85
ifFunction · 0.50

Tested by

no test coverage detected