[arvados] updated: 2.1.0-3179-gc71a52a28

git repository hosting git at public.arvados.org
Wed Dec 14 14:40:16 UTC 2022

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

       via  c71a52a28c9cee6511172b3130cf74e8df1b4950 (commit)
      from  9f7c39451c16003c6c6e0fb8de5a990781cb300f (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 c71a52a28c9cee6511172b3130cf74e8df1b4950
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Dec 14 14:36:54 2022 +0000

    19872: Add a timeout to wait()
    Add a timeout when waiting for a cache slot to avoid the possibility
    of waiting forever on wait().
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index afb9180e6..f0ccf85d7 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -335,8 +335,10 @@ class KeepBlockCache(object):
                 self._resize_cache(self.cache_max, self._max_slots-1)
                 while len(self._cache) >= self._max_slots:
                     # If there isn't a slot available, need to wait
-                    # until some other cache action happens.
-                    self._cache_updating.wait()
+                    # for something to happen that releases one of the
+                    # cache slots.  Idle for 200 ms or woken up by
+                    # another thread
+                    self._cache_updating.wait(timeout=0.2)
                     self._resize_cache(self.cache_max, self._max_slots-1)
                 if self._disk_cache:



More information about the arvados-commits mailing list