* db
authorArt Cancro <ajc@citadel.org>
Thu, 30 Nov 2000 04:48:29 +0000 (04:48 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 30 Nov 2000 04:48:29 +0000 (04:48 +0000)
citadel/database_sleepycat.c

index 13f11ada8bc7d62f35cb9c7ebdbab97e61624fcb..f8bb3dc0580357a5679dcfe876dbdfe2e3b2098e 100644 (file)
@@ -83,13 +83,15 @@ void open_databases(void)
         }
 
         /*
-         * We have multiple processes reading/writing these files, so
-         * we need concurrency control and a shared buffer pool, but
-         * not logging or transactions.
+        * We specify DB_PRIVATE but not DB_INIT_LOCK or DB_THREAD, even
+        * though this is a multithreaded application.  Since Citadel does all
+        * database access in S_DATABASE critical sections, access to the db
+        * is serialized already, so don't bother the database manager with
+        * it.  Besides, it locks up when we do it that way.
          */
         /* (void)dbenv->set_data_dir(dbenv, "/database/files"); */
         ret = dbenv->open(dbenv, "./data",
-               ( DB_CREATE | DB_INIT_MPOOL ),
+               ( DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE ),
                0);
        if (ret) {
                lprintf(1, "dbenv->open: %s\n", db_strerror(ret));