You're the Smart Guys that I know, and it seems this is also the forum where I once heard a long while back that DB can occasionally corrupt its files.
True? Was it someone here that mentioned that? (Skip?)
Or maybe it was bsddb? (or is that the same as the Berkeley DB, now handled by Sleepycat)
A question just came up elsewhere about DB and I seemed to recall somebody mentioning the occasional corruption. Oh, maybe it was related to multiple threads.
Any help appreciated!
Greg> You're the Smart Guys that I know, and it seems this is also the Greg> forum where I once heard a long while back that DB can Greg> occasionally corrupt its files.
Greg> A question just came up elsewhere about DB and I seemed to recall Greg> somebody mentioning the occasional corruption. Oh, maybe it was Greg> related to multiple threads.
Yes, Berkeley DB 1.85 (exposed through the bsddb module in Python) has bugs in the hash implementation. They never fixed them (well maybe in 1.86?), but moved on to version 2.x. Of course, they changed the function call interface and the file format, so many people didn't follow. They do provide a 1.85-compatible API but you have to #include db_185.h instead of db.h.
As far as I know, if you stick to the btree interface with 1.85 you should be okay. Unfortunately, both the anydbm and dbhash modules both use the hash interface, so if you're trying to be more or less portable and not modify your Python sources, you've also got buggy db files...
Someone did create a libdb 2.x-compatible module that exposes more of the underlying functionality. Check the VoP for it.
libdb == Berkeley DB == Sleepycat...