mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 15:23:02 +01:00
Fixed bug CORE-3521 : Delta file contents is not flushed to disk
This commit is contained in:
parent
317430bc0d
commit
9f94f41e4e
@ -1187,6 +1187,15 @@ void CCH_flush(thread_db* tdbb, USHORT flush_flag, SLONG tra_number)
|
||||
{
|
||||
PIO_flush(dbb, dbb->dbb_shadow->sdw_file);
|
||||
}
|
||||
|
||||
{
|
||||
BackupManager* bm = dbb->dbb_backup_manager;
|
||||
BackupManager::StateReadGuard stateGuard(tdbb);
|
||||
const int backup_state = bm->getState();
|
||||
if (backup_state == nbak_state_stalled || backup_state == nbak_state_merge)
|
||||
bm->flushDifference();
|
||||
}
|
||||
|
||||
tdbb->bumpStats(RuntimeStatistics::FLUSHES);
|
||||
}
|
||||
|
||||
|
@ -661,6 +661,11 @@ bool BackupManager::readDifference(thread_db* tdbb, ULONG diff_page, Ods::pag* p
|
||||
return true;
|
||||
}
|
||||
|
||||
void BackupManager::flushDifference()
|
||||
{
|
||||
PIO_flush(database, diff_file);
|
||||
}
|
||||
|
||||
BackupManager::BackupManager(thread_db* tdbb, Database* _database, int ini_state) :
|
||||
dbCreating(false), database(_database), diff_file(NULL), alloc_table(NULL),
|
||||
last_allocated_page(0), current_scn(0), diff_name(*_database->dbb_permanent),
|
||||
|
@ -369,6 +369,7 @@ public:
|
||||
void closeDelta();
|
||||
bool writeDifference(ISC_STATUS* status, ULONG diff_page, Ods::pag* page);
|
||||
bool readDifference(thread_db* tdbb, ULONG diff_page, Ods::pag* page);
|
||||
void flushDifference();
|
||||
|
||||
void shutdown(thread_db* tdbb);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user