Skip to content

Restore nbackup merge optimization reverted for #3827 - #9338

Open
Cool-Hunter wants to merge 2 commits into
FirebirdSQL:masterfrom
Cool-Hunter:work/gh-3827
Open

Cool-Hunter wants to merge 2 commits into
FirebirdSQL:masterfrom
Cool-Hunter:work/gh-3827

Conversation

@Cool-Hunter

Copy link
Copy Markdown

Restore BDB_merge flag which prevent writing a page back to the difference file. It always reset in CCH_mark and set right after CCH_mark only in case of endBackup marking. It should work more reliable than before.

A small cleanup of 22 yo commented code was done as well by separate commit.

testing

I tested it by 10 concurrently inserting threads with regular lock/unlock circle and get no error and get such preformance result:

master

unlock in 24159.50 ms. inserted 20K records. 827.83 rps
unlock in 24606.41 ms. inserted 20K records. 812.80 rps
unlock in 25222.37 ms. inserted 20K records. 792.95 rps
unlock in 24156.17 ms. inserted 20K records. 827.95 rps
unlock in 20190.46 ms. inserted 15K records. 742.93 rps

patched

unlock in 21532.20 ms. inserted 13K records. 603.75 rps
unlock in 17477.75 ms. inserted 21K records. 1201.53 rps
unlock in 17698.37 ms. inserted 24K records. 1356.06 rps
unlock in 18783.53 ms. inserted 21K records. 1118.00 rps
unlock in 22502.46 ms. inserted 12K records. 533.28 rps
unlock in 18402.62 ms. inserted 20K records. 1086.80 rps

I've attach a test
nbak-test.py

to run fix paths inside and

python3 nbak-test.py

@Cool-Hunter Cool-Hunter changed the title Restore nbackup merge optimization Restore nbackup merge optimization reverted for #3827 Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants