http://qs321.pair.com?node_id=682475


in reply to Re^3: Multiple write locking for BerkeleyDB
in thread Multiple write locking for BerkeleyDB

I thought that with an update I need to wrap the read and the write in an overall lock. Doesn't the built in automatic locking, lock the operations separately?
  • Comment on Re^4: Multiple write locking for BerkeleyDB

Replies are listed 'Best First'.
Re^5: Multiple write locking for BerkeleyDB
by perrin (Chancellor) on Apr 23, 2008 at 20:00 UTC
    You're saying you want to get an exclusive lock before you start your read and hold it until you finish the update? That will require some lower level access. BerkeleyDB can do it, but I think you'll have to use the more complex approach and run a deadlock daemon, and I don't have sample code for it. This is trivial with MySQL, so it might be easier to give that another try.