From e838078517bd7dd825d65aacf521bb384665915e Mon Sep 17 00:00:00 2001 From: dimitr Date: Thu, 3 Feb 2011 08:00:48 +0000 Subject: [PATCH] Removed the supposedly wrong checkout (it was added in v2.0), as theoretically it can lead to race conditions in the page cache. --- src/jrd/cch.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp index bba18ba44f..95c74cedb6 100644 --- a/src/jrd/cch.cpp +++ b/src/jrd/cch.cpp @@ -4958,8 +4958,6 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, LATCH latc /* This code is only used by the background I/O threads: cache writer, cache reader and garbage collector. */ - THREAD_EXIT(); - for (que_inst = bcb->bcb_in_use.que_backward; que_inst != &bcb->bcb_in_use; que_inst = que_inst->que_backward) { @@ -4971,7 +4969,6 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, LATCH latc continue; } if (bdb->bdb_flags & BDB_db_dirty) { - THREAD_ENTER(); // BCB_MUTEX_RELEASE; return bdb; } @@ -4983,7 +4980,6 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, LATCH latc else { /* if (page == CHECKPOINT_PAGE) */ if (bdb->bdb_flags & BDB_checkpoint) { - THREAD_ENTER(); // BCB_MUTEX_RELEASE; return bdb; } @@ -4994,7 +4990,6 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, LATCH latc bcb->bcb_flags &= ~BCB_free_pending; } - THREAD_ENTER(); // BCB_MUTEX_RELEASE; return NULL; }