Message19380
Logged In: YES
user_id=44345
> We also get this error, though not using Python, but C.
> I'm not sure why people are so eager to dismiss it as an
> issue here, however, for it might be something your Python
> is doing with the Berkeley DB interface which could be
> improved.
The anydbm module was written long before Berkeley DB
supported any sort of adequate locking mechanisms (in the
BDB 1.85 days). It also supports multiple backends (dbm and
gdbm in particular). The API it present to the user is of
little more than a dictionary that happens to be stored
on-disk. To change its API at this point to use bsddb's
(and underlying it, BDB's) locking mechanisms is impossible,
as neither of the other underlying db backends supports
locking.
The right thing for the author to do in this case is
probably to use the new bsddb module directly and take
advantage of its locking features. The shelve module's
functionality would be trivial to implement on top of that.
All it really does is transparently pickle the data written
to the disk.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:18:53 | admin | link | issue857909 messages |
2007-08-23 14:18:53 | admin | create | |
|