Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: Multiple write locking for BerkeleyDB

by dino (Sexton)
on Apr 23, 2008 at 19:05 UTC ( #682463=note: print w/replies, xml ) Need Help??

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

Thanks for the url. Wrt BerkeleyDB I was unable to find any Read Modify Write locking code. It looks like CDS was used in an automatic fashion. I'm guessing I need to invoke lock_vec and its friends but I'm not sure how.
  • Comment on Re^2: Multiple write locking for BerkeleyDB

Replies are listed 'Best First'.
Re^3: Multiple write locking for BerkeleyDB
by perrin (Chancellor) on Apr 23, 2008 at 19:16 UTC
    No, that's just it: BDB handles the locking for you. You don't need to do any explicit locking.
      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?
        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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682463]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2023-06-09 07:52 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (35 votes). Check out past polls.