dbTalk Databases Forums  

No return when DB open, how?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss No return when DB open, how? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
William.P
 
Posts: n/a

Default No return when DB open, how? - 06-26-2006 , 06:58 AM






i use Python bsddb moudle
create env as above:
flags =
bsddb.db.DB_CREATE|bsddb.db.DB_INIT_TXN|bsddb.db.D B_INIT_MPOOL|bsddb.db.DB_THREAD|
bsddb.db.DB_RECOVER
dbenv = bsddb.db.DBEnv()
dbenv.open(self.__dbpath,flags)

create db:
db = bsddb.db.DB(dbenv)
db.open(self.filename,self.__listname,
bsddb.db.DB_HASH,
bsddb.db.DB_CREATE| bsddb.db.DB_THREAD)


after create some dbs(not the first time), the "DB.open" function never
return again,
i don't know how could this happen, this problem will make me crazy, I
use bdb in multi-thread, but it will let all my thread dead
immediately,
what's wrong with bdb?


Reply With Quote
  #2  
Old   
William.P
 
Posts: n/a

Default Re: No return when DB open, how? - 06-28-2006 , 11:10 PM






I found what's wrong here. Deadlock occur while i use dbd in
multithread, all ok after i remove all thread flag and bsd env.
Now I provide thread-safe mechanism outside the python bsddb
module, But I can't ensure data is safe while program exit abnormally,
DBEnv's recover cant ensure too,
At last, I have to change my database, only use bdb to provide
cache


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.