From: <di...@us...> - 2014-08-08 15:28:07
|
Revision: 59961 http://sourceforge.net/p/firebird/code/59961 Author: dimitr Date: 2014-08-08 15:27:59 +0000 (Fri, 08 Aug 2014) Log Message: ----------- Fixed possible deadlocks between a worker thread and an attachment-level AST. Modified Paths: -------------- firebird/trunk/src/jrd/vio.cpp Modified: firebird/trunk/src/jrd/vio.cpp =================================================================== --- firebird/trunk/src/jrd/vio.cpp 2014-08-08 01:24:47 UTC (rev 59960) +++ firebird/trunk/src/jrd/vio.cpp 2014-08-08 15:27:59 UTC (rev 59961) @@ -2069,6 +2069,8 @@ **************************************/ SET_TDBB(tdbb); + Attachment* const attachment = tdbb->getAttachment(); + #ifdef VIO_DEBUG VIO_trace(DEBUG_TRACE, "VIO_get_current (record_param %"QUADFORMAT"d, transaction %"ULONGFORMAT", pool %p)\n", @@ -2145,6 +2147,7 @@ VIO_backout(tdbb, rpb, transaction); continue; case tra_precommitted: + Attachment::Checkout cout(attachment, FB_FUNCTION); THREAD_SLEEP(100); // milliseconds continue; } @@ -2170,6 +2173,7 @@ if (state == tra_active) { + Attachment::Checkout cout(attachment, FB_FUNCTION); THREAD_SLEEP(100); // milliseconds continue; } @@ -5090,6 +5094,8 @@ **************************************/ SET_TDBB(tdbb); + Attachment* const attachment = tdbb->getAttachment(); + #ifdef VIO_DEBUG VIO_trace(DEBUG_TRACE_ALL, "prepare_update (transaction %"ULONGFORMAT @@ -5369,6 +5375,7 @@ if (state == tra_active) { + Attachment::Checkout cout(attachment, FB_FUNCTION); THREAD_SLEEP(100); // milliseconds continue; } @@ -5431,9 +5438,13 @@ } if (state == tra_precommitted) + { + Attachment::Checkout cout(attachment, FB_FUNCTION); THREAD_SLEEP(100); // milliseconds - else - VIO_backout(tdbb, rpb, transaction); + continue; + } + + VIO_backout(tdbb, rpb, transaction); } return PREPARE_OK; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |