$Log$
+ Revision 573.40 2000/12/07 04:50:33 ajc
+ * Wrap housekeeper and timer events in transaction open/close functions
+ * Checkpoint the DB as an EVT_TIMER event instead of after each session
+ (runs each minute, but actually limited by the parameters of the function)
+
Revision 573.39 2000/12/06 04:44:36 ajc
* Changed netproc to keep the use table in a flat file instead of a database
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
* it. Besides, it locks up when we do it that way.
*/
#ifdef TRANSACTION_BASED
- flags = DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_INIT_TXN;
+ flags = DB_CREATE|DB_RECOVER|DB_INIT_MPOOL|DB_PRIVATE|DB_INIT_TXN;
#else
- flags = DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE;
+ flags = DB_CREATE|DB_RECOVER|DB_INIT_MPOOL|DB_PRIVATE;
#endif
ret = dbenv->open(dbenv, "./data", flags, 0);
if (ret) {
cdb_allocate_ssd();
CtdlRegisterSessionHook(cdb_allocate_ssd, EVT_START);
#ifdef TRANSACTION_BASED
- CtdlRegisterSessionHook(cdb_checkpoint, EVT_STOP);
+ CtdlRegisterSessionHook(cdb_checkpoint, EVT_TIMER);
#endif
}
#include "housekeeping.h"
#include "sysdep_decls.h"
#include "room_ops.h"
+#include "database.h"
int housepipe[2]; /* This is the queue for housekeeping tasks */
}
extract(cmd, house_cmd, 0);
+ cdb_begin_transaction();
/* Do whatever this cmd requires */
lprintf(7, "Unknown housekeeping command\n");
}
+ cdb_end_transaction();
+
} while (did_something);
}
}
internet
uum %s
humannode Internet Gateway
-lastcontact 976081140 Wed Dec 6 00:39:00 2000
+lastcontact 976085942 Wed Dec 6 01:59:02 2000
uncnsrd
bin Mail
bin Mail
phonenum US 800 555 1212
humannode Tesseract Project
-lastcontact 976081158 Wed Dec 6 00:39:18 2000
+lastcontact 976085943 Wed Dec 6 01:59:03 2000
pixel
use uncnsrd
humannode ISCA BBS
lastcontact 975653967 Fri Dec 1 01:59:27 2000
+bin Mail
+bin Mail
+humannode Ô\91\ 4\bhðÿ¿lðÿ¿
+lastcontact 976082265 Wed Dec 6 00:57:45 2000
+
dead_session_purge();
if ((time(NULL) - last_timer) > 60L) {
last_timer = time(NULL);
+ cdb_begin_transaction();
PerformSessionHooks(EVT_TIMER);
+ cdb_end_transaction();
}
}