[Object Spilling] Remove LRU eviction (#13977)

* done.

* formatting.

* done.

* done.
This commit is contained in:
SangBin Cho
2021-02-15 14:24:53 -08:00
committed by GitHub
parent e457872fe1
commit 4ad79ca963
20 changed files with 128 additions and 310 deletions
+8 -14
View File
@@ -32,10 +32,9 @@ def ray_init_with_task_retry_delay():
@pytest.mark.parametrize(
"ray_start_regular", [{
"object_store_memory": 150 * 1024 * 1024,
"_lru_evict": True,
}],
indirect=True)
def test_actor_eviction(ray_start_regular):
def test_actor_spilled(ray_start_regular):
object_store_memory = 150 * 1024 * 1024
@ray.remote
@@ -58,19 +57,14 @@ def test_actor_eviction(ray_start_regular):
ray.get(obj)
# Get each object again. At this point, the earlier objects should have
# been evicted.
num_evicted, num_success = 0, 0
# been spilled.
num_success = 0
for obj in objects:
try:
val = ray.get(obj)
assert isinstance(val, np.ndarray), val
num_success += 1
except ray.exceptions.ObjectLostError:
num_evicted += 1
# Some objects should have been evicted, and some should still be in the
# object store.
assert num_evicted > 0
assert num_success > 0
val = ray.get(obj)
assert isinstance(val, np.ndarray), val
num_success += 1
# All of objects should've been spilled, so all of them should succeed.
assert num_success == len(objects)
@pytest.mark.skipif(sys.platform == "win32", reason="Very flaky on Windows.")