]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/expire/serv_expire.c
Experiment with DB->compact() to reduce the size of database files on disk when possible.
[citadel.git] / citadel / modules / expire / serv_expire.c
index 10f8bc4bf4e173814678cee2e40227733ef410f2..7fd28e6b4a699217d90d094fc8f8ee6ac9866ee1 100644 (file)
@@ -689,11 +689,6 @@ int PurgeUseTable(StrBuf *ErrMsg) {
        struct UPurgeList *uptr; 
 
        /* Phase 1: traverse through the table, discovering old records... */
-       if (CheckTDAPVeto(CDB_USETABLE, ErrMsg))
-       {
-               syslog(LOG_DEBUG, "Purge use table: VETO!");
-               return 0;
-       }
 
        syslog(LOG_DEBUG, "Purge use table: phase 1");
        cdb_rewind(CDB_USETABLE);
@@ -910,6 +905,13 @@ void purge_databases(void)
                syslog(LOG_NOTICE, "Processed %d message reference count adjustments.", retval);
        }
 
+       // Enable this after we've tested it and make it a site-configurable option.
+       // This will allow the database files to shrink when they can.
+       // if (!server_shutting_down)
+       // {
+               // cdb_compact();
+       // }
+
        if (!server_shutting_down)
        {
                syslog(LOG_INFO, "Auto-purger: finished.");