[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Disable DB_RECOVER stuff until it works
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv31595/lib/mixminion
Modified Files:
Filestore.py
Log Message:
Disable DB_RECOVER stuff until it works
Index: Filestore.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Filestore.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- Filestore.py 9 Aug 2004 19:29:55 -0000 1.22
+++ Filestore.py 9 Aug 2004 20:04:59 -0000 1.23
@@ -533,17 +533,25 @@
possible, reaches into bsddb.db and uses the DB_RECOVER* flag(s) to
handle possible corruption from crashing without closing the database.
"""
+ if 1:
+ #XXXX008 This function is borked. Fix it or remove it.
+ return anydbm.open(filename, flag, mode)
try:
import bsddb
except ImportError:
# Fallback to anydbm, which delegates to dbhash
return anydbm.open(filename, flag, mode)
# Adapted from bsddb.hashopen
- flags = bsddb._checkFlag(flag)
- flags |= getattr(bsddb.db, "DB_RECOVER", 0)
- flags |= getattr(bsddb.db, "DB_RECOVER_FATAL", 0)
- d = bsddb.db.DB()
- d.set_flags(flags)
+ e = bsddb.db.DBEnv(bsddb.db.DB_PRIVATE|
+ bsddb.db.DB_CREATE |
+ bsddb.db.DB_THREAD |
+ bsddb.db.DB_INIT_LOCK |
+ bsddb.db.DB_INIT_MPOOL | bsddb.db.DB_RECOVER )
+ flags = bsddb.db.DB_CREATE | bsddb.db.DB_THREAD
+ flags |= getattr(bsddb.db, "DB_AUTO_COMMIT", 0)
+ #flags |= getattr(bsddb.db, "DB_RECOVER", 0)
+ #flags |= getattr(bsddb.db, "DB_RECOVER_FATAL", 0)
+ d = bsddb.db.DB(e)
d.open(filename, bsddb.db.DB_HASH, flags, mode)
return bsddb._DBWithCursor(d)