Re-route asyncio plasma code path through raylet instead of direct plasma connection (#7234)

This commit is contained in:
ijrsvt
2020-03-03 12:43:47 -08:00
committed by GitHub
parent c2c6d96490
commit fb76092d75
14 changed files with 169 additions and 25 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ async def _async_init():
worker = ray.worker.global_worker
loop = asyncio.get_event_loop()
handler = PlasmaEventHandler(loop, worker)
worker.core_worker.subscribe_to_plasma(handler)
worker.core_worker.set_plasma_added_callback(handler)
logger.debug("AsyncPlasma Connection Created!")
+4 -2
View File
@@ -71,6 +71,8 @@ class PlasmaEventHandler:
future = PlasmaObjectFuture(loop=self._loop)
self._waiting_dict[object_id].append(future)
self.check_immediately(object_id)
if not self.check_immediately(object_id) and len(
self._waiting_dict[object_id]) == 1:
# Only subscribe once
self._worker.core_worker.subscribe_to_plasma_object(object_id)
return future