8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:03:02 +01:00
This commit is contained in:
Adriano dos Santos Fernandes 2016-08-23 22:23:33 -03:00
parent 2abf6778a4
commit e5b1a902c7
5 changed files with 13 additions and 10 deletions

View File

@ -1732,7 +1732,7 @@ bool set_diff_page(thread_db* tdbb, BufferDesc* bdb)
// At PAG_set_page_scn() below we could dirty SCN page and thus acquire // At PAG_set_page_scn() below we could dirty SCN page and thus acquire
// nbackup state lock recursively. Since RWLock allows it, we are safe. // nbackup state lock recursively. Since RWLock allows it, we are safe.
// Else we should release just taken state lock before call of // Else we should release just taken state lock before call of
// PAG_set_page_scn() and acquire it again. If current SCN changes meanwile // PAG_set_page_scn() and acquire it again. If current SCN changes meanwhile
// we should repeat whole process again... // we should repeat whole process again...
win window(bdb->bdb_page); win window(bdb->bdb_page);
@ -4988,7 +4988,9 @@ static bool write_page(thread_db* tdbb, BufferDesc* bdb, FbStatusVector* const s
static void clear_dirty_flag_and_nbak_state(thread_db* tdbb, BufferDesc* bdb) static void clear_dirty_flag_and_nbak_state(thread_db* tdbb, BufferDesc* bdb)
{ {
const AtomicCounter::counter_type oldFlags = bdb->bdb_flags.exchangeBitAnd(~(BDB_dirty | BDB_nbak_state_lock)); const AtomicCounter::counter_type oldFlags = bdb->bdb_flags.exchangeBitAnd(
~(BDB_dirty | BDB_nbak_state_lock));
if (oldFlags & BDB_nbak_state_lock) if (oldFlags & BDB_nbak_state_lock)
{ {
NBAK_TRACE(("unlock state for dirty page %d:%06d", NBAK_TRACE(("unlock state for dirty page %d:%06d",

View File

@ -119,7 +119,7 @@ void NBackupStateLock::blockingAstHandler(thread_db* tdbb)
NBAK_TRACE_AST(("database FLUSHED")); NBAK_TRACE_AST(("database FLUSHED"));
} }
{ { // scope
Firebird::MutexUnlockGuard counterGuard(counterMutex, FB_FUNCTION); Firebird::MutexUnlockGuard counterGuard(counterMutex, FB_FUNCTION);
backup_manager->stateBlocking = !backup_manager->localStateLock.tryBeginWrite(FB_FUNCTION); backup_manager->stateBlocking = !backup_manager->localStateLock.tryBeginWrite(FB_FUNCTION);
if (backup_manager->stateBlocking) if (backup_manager->stateBlocking)

View File

@ -502,7 +502,7 @@ private:
bool shutDown; bool shutDown;
bool allocIsValid; // true, if alloc table cache is completely read from disk bool allocIsValid; // true, if alloc table cache is completely read from disk
bool master; // this instance performs current begin\end backup process bool master; // this instance performs current begin\end backup process
bool stateBlocking; // blolcking AST handler doesn't released stateLock bool stateBlocking; // blocking AST handler doesn't released stateLock
NBackupStateLock* stateLock; NBackupStateLock* stateLock;
Firebird::RWLock localStateLock; // must be acquired before global stateLock Firebird::RWLock localStateLock; // must be acquired before global stateLock

View File

@ -5562,7 +5562,8 @@ static void replace_record(thread_db* tdbb,
} }
static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cur_rpb, record_param* new_rpb) static void refresh_fk_fields(thread_db* tdbb, Record* old_rec, record_param* cur_rpb,
record_param* new_rpb)
{ {
/************************************** /**************************************
* *