Register function race (#9346)

This commit is contained in:
Alex Wu
2020-07-28 13:51:34 -07:00
committed by GitHub
parent c00742f103
commit 21af0ceb0c
4 changed files with 10 additions and 9 deletions
+7 -3
View File
@@ -136,9 +136,13 @@ class ImportThread:
ray_constants.DUPLICATE_REMOTE_FUNCTION_THRESHOLD)
if key.startswith(b"RemoteFunction"):
with profiling.profile("register_remote_function"):
(self.worker.function_actor_manager.
fetch_and_register_remote_function(key))
# TODO (Alex): There's a race condition here if the worker is
# shutdown before the function finished registering (because core
# worker's global worker is unset before shutdown and is needed
# for profiling).
# with profiling.profile("register_remote_function"):
(self.worker.function_actor_manager.
fetch_and_register_remote_function(key))
elif key.startswith(b"FunctionsToRun"):
with profiling.profile("fetch_and_run_function"):
self.fetch_and_execute_function_to_run(key)