From dc31f92cea8a27574b985d8a6d0d30e1f37ad133 Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Sat, 2 Apr 2016 13:15:47 +0300 Subject: [PATCH] Postfix for CORE-5067. It prevents deadlocks involving the header page and some data pages (due to disabled AST delivery). --- src/jrd/jrd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp index c0afb2a5dc..1a308b5c1a 100644 --- a/src/jrd/jrd.cpp +++ b/src/jrd/jrd.cpp @@ -6534,6 +6534,12 @@ bool JRD_shutdown_database(Database* dbb, const unsigned flags) fb_assert(!dbb->locked()); +#ifdef SUPERSERVER_V2 + TRA_header_write(tdbb, dbb, 0); // Update transaction info on header page. +#endif + if (flags & SHUT_DBB_RELEASE_POOLS) + TRA_update_counters(tdbb, dbb); + // Disable AST delivery as we're about to release all locks { // scope @@ -6543,12 +6549,6 @@ bool JRD_shutdown_database(Database* dbb, const unsigned flags) // Shutdown file and/or remote connection -#ifdef SUPERSERVER_V2 - TRA_header_write(tdbb, dbb, 0); // Update transaction info on header page. -#endif - if (flags & SHUT_DBB_RELEASE_POOLS) - TRA_update_counters(tdbb, dbb); - VIO_fini(tdbb); if (dbb->dbb_crypto_manager)