Must all Concurrent Data Store (CDB) locks be explicitly released when closing a Berkeley DB?
Posted
by Steve Emmerson
on Stack Overflow
See other posts from Stack Overflow
or by Steve Emmerson
Published on 2010-03-22T17:27:59Z
Indexed on
2010/03/22
17:31 UTC
Read the original article
Hit count: 306
I have an application that comprises multiple processes each accessing a single Berkeley DB Concurrent Data Store (CDB) database. Each process is single-threaded and does no explicit locking of the database. When each process terminates normally, it calls DB->close() and DB_ENV->close(). When all processes have terminated, there should be no locks on the database. Episodically, however, the database behaves as if some process was holding a write-lock on it even though all processes have terminated normally. Does each process need to explicitly release all locks before calling DB_ENV->close()? If so, how does the process obtain the "locker" parameter for the call to DB_ENV->loc_vec()?
© Stack Overflow or respective owner