]> git.sur5r.net Git - bacula/bacula/commitdiff
Commit batch session every 800,000 files
authorEric Bollengier <eric@baculasystems.com>
Mon, 10 Sep 2012 13:41:45 +0000 (15:41 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:57 +0000 (14:50 +0200)
bacula/src/cats/sql_create.c

index 76a976ec3ff3eb0521cadbf0ca514525f4de1271..31e04807e06e6a7bc618f98ba0aa53a2beb98338 100644 (file)
@@ -908,14 +908,11 @@ bool db_create_batch_file_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
 
    split_path_and_file(jcr, bdb, ar->fname);
 
-
-/*
- * if (bdb->changes > 100000) {
- *    db_write_batch_file_records(jcr);
- *    bdb->changes = 0;
- *     sql_batch_start(jcr, bdb);
- * }
- */
+   if (bdb->changes > 800000) {
+      db_write_batch_file_records(jcr);
+      bdb->changes = 0;
+      sql_batch_start(jcr, bdb);
+   }
 
    return sql_batch_insert(jcr, bdb, ar);
 }