mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:43:04 +01:00
Backport #7233: Postfix for #5385 (CORE-5101): Fix slow database restore when Classic server mode is used
This commit is contained in:
parent
81e946209a
commit
8d0bf94d65
@ -233,14 +233,18 @@ void SHUT_database(thread_db* tdbb, SSHORT flag, SSHORT delay, Sync* guard)
|
||||
bool exclusive = notify_shutdown(tdbb, flag, delay, guard);
|
||||
bool successful = exclusive;
|
||||
|
||||
SSHORT timeout = delay ? delay - 1 : 0;
|
||||
|
||||
if (exclusive)
|
||||
{
|
||||
// Ensure we have the proper DBB_shutdown_* flags in place
|
||||
shutdown(tdbb, flag, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try to get exclusive database lock periodically up to specified delay. If we
|
||||
// haven't gotten it report shutdown error for weaker forms. For forced shutdown
|
||||
// keep notifying until successful.
|
||||
|
||||
SSHORT timeout = delay ? delay - 1 : 0;
|
||||
|
||||
if (!exclusive)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (!(dbb->dbb_ast_flags & (DBB_shut_attach | DBB_shut_tran | DBB_shut_force)))
|
||||
|
Loading…
Reference in New Issue
Block a user