On Fri, May 23, 2008 at 04:41:31PM +0200, Marc Haber wrote: > > On Fri, May 23, 2008 at 04:00:33PM +0200, Joerg Dorchain wrote: > > I wrote a mini-version of db_recover in perl. Find it as an attachment. > > Great. I would feel more comfortable though, if we'd only do the > recover if really necessary, such as in:
[...] > Is this approach flawed? Takes roughly twice the time. According to the BerkleyDB documentation they consider it "good practice to set the DB_RECOVER and DB_CREATE for every open". Unfortunately this is only possible for single-threaded applications, which, to my understanding, is the reason why upstream did not set the DB_RECOVER flags in torrus itself. Just set the recover flag, as the underlying BerkleyDB function does the check whether any action is necessary itself and in the normal case returns very fast. Bye, Joerg
signature.asc
Description: Digital signature