BerkeleyDB locking subsystem

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


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.


More information about the mailing list