Mark worker as blocked and trigger reconstruction in ray.wait. (#2864)

* Trigger reconstruction in ray.wait and mark worker as blocked.

* Add test.

* Linting.

* Don't run new test with legacy Ray.

* Only call HandleClientUnblocked if it actually blocked in ray.wait.

* Reduce time to ray.wait in the test.
This commit is contained in:
Robert Nishihara
2018-09-13 15:28:17 -07:00
committed by Philipp Moritz
parent a1b8e79c30
commit f16d33593b
4 changed files with 108 additions and 51 deletions
@@ -41,7 +41,9 @@ public class PlasmaFreeTest {
Ray.call(PlasmaFreeTest::hello).get();
}
waitResult = Ray.wait(waitFor, 1, 2 * 1000);
// Check if the object has been evicted. Don't give ray.wait enough
// time to reconstruct the object.
waitResult = Ray.wait(waitFor, 1, 0);
readyOnes = waitResult.getReady();
unreadyOnes = waitResult.getUnready();
Assert.assertEquals(0, readyOnes.size());