Fetch the object after requesting reconstruction during ray.get (#301)

* Fetch the object after requesting reconstruction during ray.get

* revert

* Fix documentation and memory leak

* Fix hanging reconstruction bug

* Fix for python3
This commit is contained in:
Stephanie Wang
2017-02-20 21:41:34 -08:00
committed by Robert Nishihara
parent 2220a33b62
commit 334aed9fa9
4 changed files with 33 additions and 27 deletions
+4
View File
@@ -460,6 +460,7 @@ class Worker(object):
object_ids (List[object_id.ObjectID]): A list of the object IDs whose
values should be retrieved.
"""
# Do an initial fetch for remote objects.
self.plasma_client.fetch([object_id.id() for object_id in object_ids])
# Get the objects. We initially try to get the objects immediately.
@@ -477,6 +478,9 @@ class Worker(object):
while len(unready_ids) > 0:
for unready_id in unready_ids:
self.photon_client.reconstruct_object(unready_id)
# Do another fetch for objects that aren't available locally yet, in case
# they were evicted since the last fetch.
self.plasma_client.fetch(list(unready_ids.keys()))
results = numbuf.retrieve_list(list(unready_ids.keys()),
self.plasma_client.conn,
GET_TIMEOUT_MILLISECONDS)