From: Eric Bollengier Date: Mon, 10 Sep 2012 13:41:45 +0000 (+0200) Subject: Commit batch session every 800,000 files X-Git-Tag: Release-7.0.0~123 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b7fbc515f8b09f2a16024d766cfc6e3e83ffdf35;p=bacula%2Fbacula Commit batch session every 800,000 files --- diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index 76a976ec3f..31e04807e0 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -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); }