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 <[email protected]> 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 <[email protected]> --- 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: [email protected] For additional commands, e-mail: [email protected]
