This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bsddb: db never opened for writing forgets its size
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, nnorwitz, staschuk
Priority: normal Keywords:

Created on 2006-05-23 02:30 by staschuk, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
dblen.py staschuk, 2006-05-23 02:30 Code to demonstrate the erroneous behaviour
Messages (4)
msg28588 - (view) Author: Steven Taschuk (staschuk) Date: 2006-05-23 02:30
See the attached program; on my machine, its output is
as described therein.  That is: if a bsddb hash
database is opened read-only, and has never been opened
for writing (except when first created), then calling
len() on the database object returns the correct value
the first time, but zero on the second and later calls.
 Opening the database for writing once seems to
eliminate the problem; even when it is opened read-only
later, len() behaves as expected.

My machine runs Linux 2.6.16, glibc 2.3.4, Python
2.4.3, and Berkeley DB 4.3.28.
msg28589 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-05-23 05:47
Logged In: YES 
user_id=33168

Greg, is this a known issue?  Any ideas?
msg28590 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2006-06-05 21:49
Logged In: YES 
user_id=413

this sounds the same as pybsddb bug 1184012.  i'm looking
into it.
msg28591 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2006-06-06 00:00
Logged In: YES 
user_id=413

fixed in python svn rev 46684.  i'll backport this one to
python 2.4 as well.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43397
2006-05-23 02:30:17staschukcreate