Skip to content

Some changes could be lost during the merge of delta file into main database file [CORE3466] #3827

Open
@firebird-automations

Description

@firebird-automations

Submitted by: @hvlad

When merge is in progress engine writes changes into both delta and main file. This creates additional IO load of course.
Therefore in v2.5 merge process was optimized - when page is read from delta file for merging purposes it is marked (with
BDB_merge flag) and not writed back into delta. It is OK if page not leave the cache until merge done. But there is a scenario
when this optimization is wrong :
a) page is read by merge process and marked by BDB_merge flag
b) page is changed by some user attachment and written into database file only
c) page is evicted from the page cache
d) user attachment going to change that page again
e) page is read from delta, this copy have no changes by (b) !
f) page is changed and written into both database and delta, overwriting changes by (b) in database

Commits: 4a916be d578149

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions