ray/test/jenkins_tests/multi_node_tests/test_wait_hanging.py
Philipp Moritz 810cc17062 Fix LRU eviction of client notification datastructure (#4021)
* convert notification_key map to C++ datastructure

* fix crash and add debug string

* clean notification map up (this was a bug before)

* remove checks

* add jenkins test

* linting

* fixes

* properly erase

* clean up

* linting

* Update test_wait_hanging.py

* Update run_multi_node_tests.sh

* increase redis_max_memory

* fix dat jenkins

* update

* Update run_multi_node_tests.sh
2019-02-13 22:20:27 -08:00

31 lines
567 B
Python

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ray
@ray.remote
def f():
return 0
@ray.remote
def g():
import time
start = time.time()
while time.time() < start + 1:
ray.get([f.remote() for _ in range(10)])
# 10MB -> hangs after ~5 iterations
# 20MB -> hangs after ~20 iterations
# 50MB -> hangs after ~50 iterations
ray.init(redis_max_memory=1024 * 1024 * 50)
i = 0
for i in range(100):
i += 1
a = g.remote()
[ok], _ = ray.wait([a])
print("iter", i)