8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 04:43:03 +01:00

Removed the supposedly wrong checkout (it was added in v2.0), as theoretically it can lead to race conditions in the page cache.

This commit is contained in:
dimitr 2011-02-03 08:00:48 +00:00
parent 5fe6508bd6
commit e838078517

View File

@ -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;
}