Re: bsddb3 locking questions



Eric S. Johansson wrote:
are there any simple examples of how to do record locking with bsddb3?

got this far with sample code from the activeware site

filename = 'fruit'

# Get an instance of BerkeleyDB
db_env = db.DBEnv()
db.set_lk_detect(db.DB_LOCK_YOUNGEST)
db_env.open("/tmp/bsddb3",db.DB_INIT_LOCK|db.DB_CREATE)


db_env.lock_id()

stuck at lock_id(). it returns a 1 (failure according to the docs and there is no hint of where the lock id value is returned so I can use it in the lock_get call. at least that is what I think I need to do.

.



Relevant Pages

  • Re: Number of tests per line of java code
    ... > be a failure. ... If you don't have specs, you will not ever be able to ... > if you do not know that they are bugs when writing the tests. ... They are not stuck on the idea, they want information that will allow ...
    (comp.lang.java.programmer)
  • Re: OT: Broadband & BT
    ... You're stuck with BT then or mobile "broadband". ... They're very good at inventing new points of failure according to my ...
    (uk.rec.motorcycles)
  • Re: Cant connect to my ISP anyone out there using ATT???
    ... >> and now am stuck at the password verification. ... I've attached a trace from ... >> of the current failure. ...
    (alt.os.linux.suse)
  • Re: My G5 & Leopard
    ... understandable why you're so productive with Windows whereas I am stuck ... I don't know the key to success, but the key to failure is to try to please ... -- Bill Cosby ...
    (comp.sys.mac.advocacy)
  • Re: Fascinated by Failure (Classic Peanuts 23 June)
    ... it's just that a fascination with ... failure has stuck with me. ... Then you might enjoy the Fail Blog: ...
    (rec.arts.comics.strips)