debuginfod: only update database stats once per groom
authorFrank Ch. Eigler <fche@redhat.com>
Thu, 15 Apr 2021 10:29:01 +0000 (06:29 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 15 Apr 2021 11:21:25 +0000 (07:21 -0400)
On very large servers, each database-stat counting pass can take tens
of minutes (!), and doing it twice per groom pass does not seriously
improve data quality.  Just do it once, after stale data removal &
basic sqlite vacuum.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx

index 3bd2ff6..ed2f77c 100644 (file)
@@ -1,5 +1,9 @@
 2021-04-15  Frank Ch. Eigler <fche@redhat.com>
 
+       * debuginfod.cxx (groom): Only update database stats once.
+
+2021-04-15  Frank Ch. Eigler <fche@redhat.com>
+
        * debuginfod.cxx (elf_classify): Recognize symtab-only stripped files
        like fedora's libicudata as debuginfo files.
 
index 2d73a13..50777f1 100644 (file)
@@ -3100,8 +3100,6 @@ void groom()
   struct timespec ts_start, ts_end;
   clock_gettime (CLOCK_MONOTONIC, &ts_start);
 
-  database_stats_report();
-
   // scan for files that have disappeared
   sqlite_ps files (db, "check old files", "select s.mtime, s.file, f.name from "
                        BUILDIDS "_file_mtime_scanned s, " BUILDIDS "_files f "