18941: Separate get() behavior for prefetch
[arvados.git] / sdk / python / arvados / arvfile.py
index fbf593d02619810b1647f78520217ac6a9b4bef7..a13575b715922f306c14ce4bb6a82fbe766fae8f 100644 (file)
@@ -593,10 +593,7 @@ class _BlockManager(object):
                 b = self._prefetch_queue.get()
                 if b is None:
                     return
-                if self._keep.has_cache_slot(b):
-                    continue
-                _logger.debug("prefetching %s", b)
-                self._keep.get(b)
+                self._keep.get(b, cache_slot_get=False)
             except Exception:
                 _logger.exception("Exception doing block prefetch")
 
@@ -844,9 +841,6 @@ class _BlockManager(object):
         if not self.prefetch_enabled:
             return
 
-        if self._keep.has_cache_slot(locator):
-            return
-
         with self.lock:
             if locator in self._bufferblocks:
                 return