20.03.2017 17:49, Nikolay Samofatov wrote: > Hello, All! > > It appears I now have some time to look into old issues. > > I know for a long time that it is possible to optimize NBAK module: > Currently, difference file page is allocated inside CCH_mark and this is > sub-optimal. > > This has not been the case during nbackup development. Early version > allocated difference pages much later, just before writing a page - in > write_page function. > > This didn't work because lock manager calls could not be used inside AST > handlers due to signals handling logic. > > Another issue at play here is early "disk full" failure path during > CCH_mark rather then write_page, but I am not sure it really matters in > terms of possible database corruption - "careful write" should in theory > take care of things even if write_page fails due to "disk full" > condition.
Practice shows that careful write can't help there. And i failed to see how CW could help in case of out of disk condition for delta file, which contains pages not in database order. > Firebird doesn't use signals for AST delivery for a long time already > and it might be possible to issue new locks from inside AST handler. > > Therefore it might make sense to go back to this logic. This would make > nbackup state locks very transient and do not require flushing page > cache during transitions. It would be very good to avoid flushing. > It also might be possible to use shared memory for synchronization > instead of lock manager calls to speed things up. Could you explain more ? > I might do either or both of those things. > > What do you think? Is it worthwhile to spend time and effort in this > area? Or better consider NBAK stable and fast enough and address some > other issue? Hard to say. Probably it depends on what another issue you want to address ;) Regards, Vlad ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel