[arvados] updated: 2.7.0-6274-g08f8ec2186

git repository hosting git at public.arvados.org
Wed Apr 3 21:18:11 UTC 2024


Summary of changes:
 sdk/python/arvados/diskcache.py | 1 -
 sdk/python/arvados/keep.py      | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

       via  08f8ec2186df6d3111fdd274e71d9e12742f5e9d (commit)
      from  db302194cfe02e27bb8d476f68831009ef2aa76d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 08f8ec2186df6d3111fdd274e71d9e12742f5e9d
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Apr 3 17:17:50 2024 -0400

    21639: Code cleanup
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/python/arvados/diskcache.py b/sdk/python/arvados/diskcache.py
index 149f5027d4..22bf73894b 100644
--- a/sdk/python/arvados/diskcache.py
+++ b/sdk/python/arvados/diskcache.py
@@ -91,7 +91,6 @@ class DiskCacheSlot(object):
                     os.remove(tmpfile)
                 except:
                     pass
-        return False
 
     def size(self):
         if self.content is None:
diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 94f8abc73f..a824621079 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -277,7 +277,7 @@ class KeepBlockCache(object):
             return
 
         _evict_candidates = collections.deque(self._cache.values())
-        while len(_evict_candidates) > 0 and (self.cache_total > cache_max or len(self._cache) > max_slots):
+        while _evict_candidates and (self.cache_total > cache_max or len(self._cache) > max_slots):
             slot = _evict_candidates.popleft()
             if not slot.ready.is_set():
                 continue
@@ -354,7 +354,7 @@ class KeepBlockCache(object):
             elif e.errno == errno.ENOSPC:
                 # Reduce disk max space to current - 256 MiB, cap cache and retry
                 with self._cache_lock:
-                    sm = sum([st.size() for st in self._cache.values()])
+                    sm = sum(st.size() for st in self._cache.values())
                     self.cache_max = max((256 * 1024 * 1024), sm - (256 * 1024 * 1024))
             elif e.errno == errno.ENODEV:
                 _logger.error("Unable to use disk cache: The underlying filesystem does not support memory mapping.")

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list