bareos: bareos-14.2 f99c722e

Author Committer Branch Timestamp Parent
mvwieringen mvwieringen bareos-14.2 2015-04-03 17:38 bareos-14.2 f16b6f5d Pending
Changeset Statistics thread should lock resources.

As the statistics thread runs as a JT_SYSTEM thread it needs to lock the
resource tree while traversing it as it could be reloaded. So we now
keep track of the current store we are processing and lock things as
short as possible. On determining the next store to use we have now the
name of the previous one we processed in the current_store variable.
When current_store is set we lookup that name and determine the next
store, if for whatever reason that gets removed (by the reload) we just
start from the beginning again collecting stats from each storage
daemon. We also cache the storageid after connecting to the daemon and
use that info in the actual statistics retrieval. Connecting to the SD
is also limited to 2 retries and 1 second wait time. We want to quickly
probe the SDs and when they are not available they will get polled in a
next run for their statistics.
mod - src/dird/stats.c Diff File