From 2a20ebeec72837e167115768fe6da750d5b0997f Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 19 Sep 2024 11:38:49 +0200 Subject: [PATCH] repository.list: refresh lock more frequently under all circumstances, we must avoid that the lock gets stale due to not being refreshed in time. there is some internal rate limiting in _lock_refresh, so calling it often should be no problem. --- src/borg/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/repository.py b/src/borg/repository.py index 23c3b1509..66db295c2 100644 --- a/src/borg/repository.py +++ b/src/borg/repository.py @@ -336,11 +336,11 @@ class Repository: list infos starting from after id . each info is a tuple (id, storage_size). """ - self._lock_refresh() collect = True if marker is None else False result = [] infos = self.store.list("data") # generator yielding ItemInfos while True: + self._lock_refresh() try: info = next(infos) except StoreObjectNotFound: