[pybsddb] DB read problem from thread

anurag uniyal anuraguniyal at yahoo.com
Wed Apr 9 04:58:06 CEST 2008


Thanks.

I am using version 4.4.2.

DB_THREAD does solves the problem but it becomes too slow.

For time being I am using DB_THREAD, with my own thread locking around calls to db, and it does speed up a bit.

rgds
Anurag


----- Original Message ----
From: Jesus Cea <jcea at argo.es>
To: Python bindings for Oracle Berkeley DB <pybsddb at argo.es>
Sent: Monday, 7 April, 2008 11:23:48 PM
Subject: Re: [pybsddb] DB read problem from thread

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

anurag uniyal wrote:
| Do anybody has a clue what I am doing wrong here?
| I suppose bsddb3 DB can be accessed from mutiple threads?
| or do I need to specifically set DB_THREAD flag? though with
| db.DB_THREAD it hangs on some mutex?

If you reuse an environment/db handle in multiple threads, you *MUST*
open them with the DB_THREAD flag. You could open a new environment/db
handle per thread, nevertheless.

The hang you are seeing in this case (DB_THREAD) would be a bug in
Berkeley DB. What version are you using?. Some releases of 4.6.* are
very buggy. Try last build, 4.6.21.

Please, post your results.

- --
Jesus Cea Avion                        _/_/      _/_/_/        _/_/_/
jcea at argo.es http://www.argo.es/~jcea/ _/_/    _/_/  _/_/    _/_/  _/_/
jabber / xmpp:jcea at jabber.org        _/_/    _/_/          _/_/_/_/_/
~                              _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"  _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBR/pfrJlgi5GaxT1NAQIH3QQAooOGdnaTMx12s3Te+nOVKcA92MaYCtDZ
NFUnsfxRmAq0znhT8mNdYrlFqwS0Djy2XYAeE1AjJVqLJM8ypGKfYb/gZhB2QQ51
anPKJA/ef3eecYhJ9et0157rtN/DzHx7Qg7Q3iIqai2+r0wPI1BKiNG0DX9Ry+Wz
406ZKl8zlk4=
=u1PA
-----END PGP SIGNATURE-----
_______________________________________________
pybsddb mailing list
pybsddb at argo.es
http://mailman.argo.es/listinfo/pybsddb
http://www.argo.es/~jcea/programacion/pybsddb.htm


      Best Jokes, Best Friends, Best Food and more. Go to http://in.promos.yahoo.com/groups/bestofyahoo/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20080409/9969c1c0/attachment.htm>


More information about the pybsddb mailing list