From b7fbc515f8b09f2a16024d766cfc6e3e83ffdf35 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 10 Sep 2012 15:41:45 +0200 Subject: [PATCH] Commit batch session every 800,000 files --- bacula/src/cats/sql_create.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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); } -- 2.39.5