[ perhaps should be a bug report, but mantis did not let me register ]

Hi,

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
me...

db_get_file_list() uses the generic db_sql_query() function, which is
guarded by 

    db_lock(mdb);
    ...
    db_unlock(mdb);
  
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
instead?
-- 
Best regards / Mit freundlichen Grüßen
  Matthias Ferdinand
-- 
one4vision GmbH                    Fon +49 681 96727 - 60
Residenz am Schlossgarten          Fax +49 681 96727 - 69
Talstraße 34-42                    i...@one4vision.de
D-66119 Saarbrücken                http://www.one4vision.de
HRB 11751                          verantwortl. Geschäftsführer:
Amtsgericht Saarbrücken            Christof Allmann, Christoph Harth

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to