From: Matthias Ferdinand <mf@14...> - 2012-07-16 19:22:50
[ perhaps should be a bug report, but mantis did not let me register ]
we have a fairly busy bacula server (bacula 5.2.5 on Ubuntu 12.04) with
large filesystem storage and a quite big mysql db.
When restoring, during the "Building directory tree for JobId(s) ..."
phase, bacula-dir cannot access the db anymore until db_get_file_list()
finishes. For Jobs with millions of files, this can take a few hours.
During that time, it is not possible to use bconsole for anything
db-related (e.g. "status dir"). I also think that no other backup job
can access the db during that time.
I am not sure if my source code analysis is correct, so please bear with
db_get_file_list() uses the generic db_sql_query() function, which is
This issues/revokes a write lock, and according to lib/rwlock.h, there
can only ever be a single writer holding a lock.
Would it be possible to modify db_get_file_list() to use read locks
Best regards / Mit freundlichen Grüßen
one4vision GmbH Fon +49 681 96727 - 60
Residenz am Schlossgarten Fax +49 681 96727 - 69
Talstraße 34-42 info@...
D-66119 Saarbrücken http://www.one4vision.de
HRB 11751 verantwortl. Geschäftsführer:
Amtsgericht Saarbrücken Christof Allmann, Christoph Harth