You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by yj...@apache.org on 2025/01/06 08:39:34 UTC
(cloudberry) 06/20: Fix LWLockHeldByMe assert failure in SharedSnapshotDump (#15007)
This is an automated email from the ASF dual-hosted git repository.
yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 2e922468d61096f3477a279f71439494b79c1b62
Author: dreamedcheng <dr...@gmail.com>
AuthorDate: Thu Feb 23 08:48:46 2023 +0800
Fix LWLockHeldByMe assert failure in SharedSnapshotDump (#15007)
Note that when SharedSnapshotDump is called, the caller must hold the
SharedSnapshotLock in advance, so this commit fixes the case that didn't
satisfy this condition.
Co-authored-by: wuchengwen <wc...@alibaba-inc.com>
---
src/backend/utils/time/sharedsnapshot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backend/utils/time/sharedsnapshot.c b/src/backend/utils/time/sharedsnapshot.c
index 061d9a6d18..7fe003584c 100644
--- a/src/backend/utils/time/sharedsnapshot.c
+++ b/src/backend/utils/time/sharedsnapshot.c
@@ -368,8 +368,9 @@ retry:
if (testSlot->slotindex > arrayP->maxSlots)
{
+ char *slot_dump = SharedSnapshotDump();
LWLockRelease(SharedSnapshotLock);
- elog(ERROR, "Shared Local Snapshots Array appears corrupted: %s", SharedSnapshotDump());
+ elog(ERROR, "Shared Local Snapshots Array appears corrupted: %s", slot_dump);
}
if (testSlot->slotid == slotId)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org