From e81068d8f9ca4f3bf8bf3273ae7cc9b6e772083c Mon Sep 17 00:00:00 2001 From: AlexPeshkoff Date: Sun, 28 Jan 2024 12:25:48 +0300 Subject: [PATCH] Fixed #7979: Hang when database with disconnect trigger using MON$ tables is shutting down (cherry picked from commit 481863e6322547876eb901e36b37b9ed3a21374b) --- src/jrd/cch.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp index a21e8ebe75..86d97a6773 100644 --- a/src/jrd/cch.cpp +++ b/src/jrd/cch.cpp @@ -522,8 +522,6 @@ bool CCH_exclusive_attachment(thread_db* tdbb, USHORT level, SSHORT wait_flag, S { try { - tdbb->checkCancelState(true); - bool found = false; for (Jrd::Attachment* other_attachment = attachment->att_next; other_attachment; other_attachment = other_attachment->att_next) @@ -574,6 +572,7 @@ bool CCH_exclusive_attachment(thread_db* tdbb, USHORT level, SSHORT wait_flag, S if (remaining >= CCH_EXCLUSIVE_RETRY_INTERVAL) { SyncUnlockGuard unlock(exLock ? (*exGuard) : dsGuard); + tdbb->reschedule(true); Thread::sleep(CCH_EXCLUSIVE_RETRY_INTERVAL * 1000); }