$Log$
+ Revision 573.44 2000/12/09 06:20:06 ajc
+ * A few final touches to the Sleepycat DB back-end
+
Revision 573.43 2000/12/08 17:06:33 ajc
* Wrap txn_begin and txn_end in S_DATABASE mutex
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
else if (!strcasecmp(buf, "visit")) artv_import_visit();
else if (!strcasecmp(buf, "message")) artv_import_message();
else break;
+
+ /* Yes, this is correct: end *then* begin. Since we're in a
+ * session command loop, there's already a transaction in
+ * progress. We want to end it and then begin a new one at the
+ * end of every object import, otherwise the entire import
+ * logs as a single transaction. Not only would that be a bad
+ * idea, but it'll actually crash the db when importing very
+ * large files.
+ */
+ cdb_end_transaction();
+ cdb_begin_transaction();
+
}
lprintf(7, "Invalid keyword <%s>. Flushing input.\n", buf);
while (client_gets(buf), strcmp(buf, "000")) ;;
lprintf(7, "Loading citadel.config\n");
get_config();
+
/*
* Do non system dependent startup functions.
*/
* Load any server-side modules (plugins) available here.
*/
lprintf(7, "Initializing loadable modules\n");
+ cdb_begin_transaction();
if ((moddir = malloc(strlen(bbs_home_directory) + 9)) != NULL) {
sprintf(moddir, "%s/modules", bbs_home_directory);
DLoader_Init(moddir);
free(moddir);
}
+ cdb_end_transaction();
/*
* The rescan pipe exists so that worker threads can be woken up and
}
}
+
+
/*
* Create the housekeeper thread
*/