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 openhash
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: bolzonella, gregory.p.smith, loewis
Priority: normal Keywords:

Created on 2005-02-07 09:24 by bolzonella, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg24188 - (view) Author: Andrea Bolzonella (bolzonella) Date: 2005-02-07 09:24
Python 2.4 (#1, Dec  8 2004, 18:57:30) 
[GCC 3.3.3 (SuSE Linux)] on linux2 
 
>>> import bsddb 
>>> h = bsddb.hashopen('test','c',cachesize=100) 
Traceback (most recent call last): 
  File "<stdin>", line 1, in ? 
  File "/home/alex/DLD/lib/python2.4/bsddb/__init__.py", line 
288, in hashopen 
bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- 
DB->set_cachesize: method not permitted in shared 
environment') 
 
I replace bsddb.hashopen with a 2.3.3 version and it works. 
 
 
msg24189 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-02-10 00:33
Logged In: YES 
user_id=21627

Apparently, this is caused by hashopen now allocated a
DBEnv. This, in turn, is necessary to allow multiple threads
to access the same database simultaneously.

I'm unsure why bsddb does not support shared access and
having a cache size simultaneously; it might be best to
disallow the cachesize argument, and require users who want
to specify it to use DB.open explicitly (with no environment).
msg24190 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2006-04-12 20:39
Logged In: YES 
user_id=413

fixed in python repository.  commits 45319 and 45320 for 2.5
and 2.4.

set_cachesize needed to be called on the DBEnv object prior
to opening now instead of the DB object.
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41542
2005-02-07 09:24:06bolzonellacreate