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

Function SyncRepCleanupAtProcExit

src/backend/replication/syncrep.c:551–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549}
550
551void
552SyncRepCleanupAtProcExit(void)
553{
554 /*
555 * First check if we are removed from the queue without the lock to not
556 * slow down backend exit.
557 */
558 if (!SHMQueueIsDetached(&(MyProc->syncRepLinks)))
559 {
560 LWLockAcquire(SyncRepLock, LW_EXCLUSIVE);
561
562 /* maybe we have just been removed, so recheck */
563 if (!SHMQueueIsDetached(&(MyProc->syncRepLinks)))
564 SHMQueueDelete(&(MyProc->syncRepLinks));
565
566 LWLockRelease(SyncRepLock);
567 }
568}
569
570/*
571 * ===========================================================

Callers 1

ProcKillFunction · 0.85

Calls 4

SHMQueueIsDetachedFunction · 0.85
LWLockAcquireFunction · 0.85
SHMQueueDeleteFunction · 0.85
LWLockReleaseFunction · 0.85

Tested by

no test coverage detected