[ZODB-Dev] duplicate functionality in bsddb3Storage
Andrew Dalke
Andrew Dalke" <dalke@dalkescientific.com
Tue, 9 Oct 2001 16:09:30 -0600
Hello,
I'm working with ZODB outside of Zope, as part of a database
for chemical informatics. We were using FileStorage but ran
into the 2GB file size limit, so we've been trying out the
(admittedly beta) bsddb3Storage.Full.Full with the ZODB in
Zope-2.4.1.
We ran into the "Lock table is out of available locks"
problem mentioned in the README. I couldn't figure out
what it meant to tweak the DB_CONFIG file so I grepped the
source code for "set_lk_max" and change the value in
base.py from 10,000 to 100,000.
This didn't change anything. After a while I figure out
it was because there's duplicate functionality between
base.py (which has a 'envFromString') and BerkeleyBase.py
(which has a 'env_from_string'). I had been changing the
wrong function.
These functions do almost the same thing, except when there
is an error (directory already exists, or env.open fails)
in which case different exceptions are raised.
Once we changed the right settings we didn't have the problem
we had earlier.
Since it's confusing, you all might want to think about
reducing this little bit of duplication in the code.
Also, since I'm here, the Sleepycat docs say "set_lk_max" is
deprecated, and this is the function used in base.py and
hinted at in the README.
BTW, both of these are related to Barry's README comment
] Thus, Packless ships with the default number of Berkeley locks
] set to 10,000 (BAW: is this still the case, and what about
] Full and Minimal?)
The answers are "yes" (using a deprecated API) and "not for Full
nor Minimal".
Andrew
dalke@dalkescientific.com