diff src/database.c @ 257:087e7039b569 noffle

[svn] * src/database.c: DB_compact() now does nothing. It was calling gdbm_reorganize() which did rebuild on the database, copying it to a new database and renaming. This now has an explicit function, Db_rebuild(), and you don't want to chew disc space like this during a routine expire.
author bears
date Wed, 26 Jun 2002 14:28:35 +0100
parents 52f467c7213b
children 3477050e8d10
line wrap: on
line diff
--- a/src/database.c	Wed Jun 26 14:28:06 2002 +0100
+++ b/src/database.c	Wed Jun 26 14:28:35 2002 +0100
@@ -1,7 +1,7 @@
 /*
   database.c
 
-  $Id: database.c 387 2002-06-26 13:15:44Z bears $
+  $Id: database.c 389 2002-06-26 13:28:35Z bears $
 
   Uses GNU gdbm library. Using Berkeley db (included in libc6) was
   cumbersome. It is based on Berkeley db 1.85, which has severe bugs
@@ -590,8 +590,18 @@
 Db_compact( void )
 {
     ASSERT( db.dbf );
-    if ( gdbm_reorganize( db.dbf ) != 0 )
-	Log_err( "Error compacting article base: %s", errMsg() );
+
+    /*
+     * You'd think it would be sensible to do something like
+     *
+     * if ( gdbm_reorganize( db.dbf ) != 0 )
+     * 	 Log_err( "Error compacting article base: %s", errMsg() );
+     *
+     * here. But this just copies the database to a new one and renames,
+     * which is what Db_rebuild() does.
+     *
+     * So do nothing. We don't want expire to chew disc space.
+     */
 }
 
 /*