mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
More reliable cleanup for the applier. This should fix replicator crashes after replica shutdown.
This commit is contained in:
parent
4848fbe6cf
commit
d7d16682cf
@ -6483,9 +6483,8 @@ void JReplicator::freeEngineData(Firebird::CheckStatusWrapper* user_status)
|
||||
|
||||
try
|
||||
{
|
||||
AutoPtr<Applier> cleanupApplier(applier);
|
||||
cleanupApplier->shutdown(tdbb);
|
||||
fb_assert(!applier);
|
||||
applier->shutdown(tdbb);
|
||||
applier = nullptr;
|
||||
}
|
||||
catch (const Exception& ex)
|
||||
{
|
||||
@ -7650,10 +7649,7 @@ void release_attachment(thread_db* tdbb, Jrd::Attachment* attachment, XThreadEns
|
||||
attachment->att_dsql_instance->dbb_statement_cache->shutdown(tdbb);
|
||||
|
||||
while (attachment->att_repl_appliers.hasData())
|
||||
{
|
||||
AutoPtr<Applier> cleanupApplier(attachment->att_repl_appliers.pop());
|
||||
cleanupApplier->shutdown(tdbb);
|
||||
}
|
||||
attachment->att_repl_appliers.pop()->shutdown(tdbb);
|
||||
|
||||
if (dbb->dbb_crypto_manager)
|
||||
dbb->dbb_crypto_manager->detach(tdbb, attachment);
|
||||
|
@ -285,6 +285,8 @@ void Applier::shutdown(thread_db* tdbb)
|
||||
m_interface->resetHandle();
|
||||
m_interface = nullptr;
|
||||
}
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
void Applier::process(thread_db* tdbb, ULONG length, const UCHAR* data)
|
||||
|
Loading…
Reference in New Issue
Block a user