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:

 my $env = new BerkeleyDB::Env( -Home  => $Torrus::Global::dbHome,
                -Flags => (DB_CREATE | DB_INIT_LOCK),
                -Mode  => 0664, -ErrFile => *STDERR, -Verbose => 1 );
 if( not defined($env) ) {
   $env = new BerkeleyDB::Env( -Home  => $Torrus::Global::dbHome,
                -Flags => (DB_CREATE | DB_RECOVER | DB_INIT_TXN | DB_INIT_LOCK),
                -Mode  => 0664, -ErrFile => *STDERR, -Verbose => 1 );
 }
 if( not defined($env) ) { die "Cannot create BerkeleyDB Environment: 
".$BerkeleyDB::Error; }

Is this approach flawed?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to