[pybsddb] Where is the bug tracker? Multi-threaded len() bug

Yong Li codercoder at 10gic.net
Fri Dec 26 18:47:58 CET 2008


Create a dir named "db" in current dir.

run writer.py
run reader.py
you will see that the length displayed by reader.py does not change,
even as writer is writing to the db.
Happy holidays and happy bug hunting :)



On Fri, Dec 26, 2008 at 11:43 AM, Jesus Cea <jcea at argo.es> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yong Li wrote:
>> Where is the bug tracker?
>
> Not bug tracker (yet).
>
>> db_env.open(db_path, bsddb.db.DB_CREATE | bsddb.db.DB_INIT_MPOOL |
>> bsddb.db.DB_INIT_CDB)
>> cache = bsddb.db.DB(db_env)
>> cache.open(filename='cache.db', dbname='cache',
>> dbtype=bsddb.db.DB_BTREE, flags=bsddb.db.DB_CREATE)
>> ...
>>
>> len(cache):
>> 900
>>
>> after adding some items in another process, len(cache) still returns
>> 900. I think the value is being cached somewhere and not being
>> refreshed.
>
> Please, post the entire code to replicate the problem.
>
> - --
> Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
> jcea at jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
> 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
>
> iQCVAwUBSVUJxZlgi5GaxT1NAQKjcwP/SfjCtObz2U4rqeLm8o3iP29VQqN60oEM
> tLRjxdwgDhJ2rdbMEy7Pd8l5Rxkqyq32VGAcDlwSMd8hukfI+eqZL7Pg7adKVRe3
> 0qrhV9V+rCpJCDwGA8AuIsnLK41r5xYOBzNTJg3PkCGM901P003eiCxgJi8VsFtY
> iop3Jmz/v/M=
> =s7ta
> -----END PGP SIGNATURE-----
> _______________________________________________
> pybsddb mailing list
> pybsddb at argo.es
> http://mailman.argo.es/listinfo/pybsddb
> http://www.argo.es/~jcea/programacion/pybsddb.htm
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: writer.py
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20081226/f99f1e96/attachment.pl>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: reader.py
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20081226/f99f1e96/attachment-0001.pl>


More information about the pybsddb mailing list