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

Postfix for #7255: READ COMMITTED READ CONSISTENCY mode is broken in Classic / SuperClassic on Linux; fixed lockman bugcheck when finalizeTpc() is called more than once

This commit is contained in:
AlexPeshkoff 2022-08-31 13:10:08 +03:00
parent 44fd5f3bff
commit f99410e716

View File

@ -132,6 +132,10 @@ TipCache::~TipCache()
void TipCache::finalizeTpc(thread_db* tdbb)
{
// check for finalizeTpc() called more than once
if (!m_lock.hasData())
return;
// To avoid race conditions, this function might only
// be called during database shutdown when AST delivery is already disabled
@ -175,15 +179,16 @@ void TipCache::finalizeTpc(thread_db* tdbb)
SharedMemoryBase::unlinkFile(nmSnap.c_str());
if (nmHdr.hasData())
SharedMemoryBase::unlinkFile(nmHdr.c_str());
LCK_release(tdbb, m_lock);
}
else
{
tdbb->tdbb_status_vector->init();
return;
}
}
else
LCK_release(tdbb, m_lock);
LCK_release(tdbb, m_lock);
delete m_lock.release();
}
CommitNumber TipCache::cacheState(TraNumber number)