BerkeleyDB locking subsystem

Thomas Busch tbusch at cpan.org
Mon Jul 31 15:41:41 BST 2006


Hi London.pm,

I'm using the CPAN package BerkeleyDB (not DB_File) to share
hashes between processes. The Berkeley environment I use for
this purpose is initialized with the flags DB_CREATE, DB_INIT_CDB,
and DB_INIT_MPOOL. It all works fine, except when one of the processes
crashes during a read or write, the Berkeley Hash gets
locked forever.

Is there any way to avoid locking altogether when using concurrent
access to a BerkeleyDB, so that a crash of a process wouldn't affect
the BerkeleyDB ? If not is there a way to let locks expire. And if
this doesn't work what are my alternatives.

Thomas.


More information about the london.pm mailing list