On 04/03/12 12:13, Dimitry Sibiryakov wrote:
> 03.04.2012 9:55, Alex Peshkoff wrote:
>> This method looks ugly at first, but it has one great advantage -
>> ability to have switch 'verbose' and let user watch progress with
>> database encryption.
>    What prevent gfix from using services API and showing the progress?..
>

Main problem is that gfix is almost 'do nothing' utility - it just
places appropriate tags to DPB and attaches database. After it all job
is done by engine during attach. At this time utility can't do anything
useful cause control has not returned to it from isc_attach_database().
It also can't do something in other threads cause it has no handles
before completion of attach. When attach is completed, nothing remains
to do for gfix - everything is already done.

What about suing services API and showing progress. To show some
progress using services engine must have pointer to UtilSvc class (one
which controls in service or standalone mode does utility run) during
attach, i.e. we must have a way to pass this class to regular
attachDatabase() call. Somewhy I dislike such solutions :-)


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to