summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore.pm
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-12-04 12:01:01 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-12-04 12:01:01 +0100
commitff87476fe745ecafcafe779241469b5617831c27 (patch)
treef942062e21929dfb23c4746ce36878853ee84547 /lib/App/BorgRestore.pm
parenta86bb1b8ffdb822187ce4841d72f0698e1446dd7 (diff)
downloadApp-BorgRestore-ff87476fe745ecafcafe779241469b5617831c27.tar.gz
App-BorgRestore-ff87476fe745ecafcafe779241469b5617831c27.tar.xz
Warn if sqlite cache is full
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/BorgRestore.pm')
-rw-r--r--lib/App/BorgRestore.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm
index b26c88d..828838c 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -438,6 +438,7 @@ method _handle_removed_archives($borg_archives) {
$self->{db}->remove_archive($archive);
$self->{db}->commit;
$self->{db}->vacuum;
+ $self->{db}->verify_cache_fill_rate_ok();
}
my $end = Time::HiRes::gettimeofday();
@@ -476,6 +477,7 @@ method _handle_added_archives($borg_archives) {
$self->_save_node($archive_id, undef, $lookuptable);
$self->{db}->commit;
$self->{db}->vacuum;
+ $self->{db}->verify_cache_fill_rate_ok();
my $end = Time::HiRes::gettimeofday();
$log->debugf("Adding archive finished after: %.5fs (parsing borg output took %.5fs)", $end - $start, $borg_time - $start);
@@ -519,6 +521,7 @@ method update_cache() {
$self->_handle_added_archives($borg_archives);
$log->debugf("DB contains information for %d archives in %d rows", scalar(@{$self->{db}->get_archive_names()}), $self->{db}->get_archive_row_count());
+ $self->{db}->verify_cache_fill_rate_ok();
}