|
|
|
|
|
|
| Author |
Message |
William.P *nix forums beginner
Joined: 24 Jun 2006
Posts: 4
|
Posted: Mon Jun 26, 2006 11:58 am Post subject:
No return when DB open, how?
|
|
|
i use Python bsddb moudle
create env as above:
flags =
bsddb.db.DB_CREATE|bsddb.db.DB_INIT_TXN|bsddb.db.DB_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? |
|
| Back to top |
|
 |
William.P *nix forums beginner
Joined: 24 Jun 2006
Posts: 4
|
Posted: Thu Jun 29, 2006 4:10 am Post subject:
Re: No return when DB open, how?
|
|
|
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 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Tue Dec 02, 2008 12:38 pm | All times are GMT
|
|
Per Insurance | Credit Card | Credit Check | eHarmony Coupon | Loans
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|