8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 04:43:03 +01:00

Posfix for #7199: Various errors (strange messages in firebird.log, segfaults) with high rate of attach/detach database operations: partially restored old logic to avoid problems with replication shutdown

This commit is contained in:
AlexPeshkoff 2022-06-03 18:38:59 +03:00
parent b0700cc328
commit 0d5c71d90a

View File

@ -527,13 +527,17 @@ namespace Jrd
Database::GlobalObjectHolder::~GlobalObjectHolder()
{
// dtor is executed under glblObjectsMutex protection
if (m_replMgr)
m_replMgr->shutdown();
Database::GlobalObjectHolder::DbId* entry = g_hashTable->lookup(m_id);
if (!g_hashTable->remove(m_id))
fb_assert(false);
{ // scope
// here we cleanup what should not be globally protected
MutexUnlockGuard guard(glblObjectsMutex, FB_FUNCTION);
if (m_replMgr)
m_replMgr->shutdown();
}
m_lockMgr = nullptr;
m_eventMgr = nullptr;
m_replMgr = nullptr;