Closed
Description
Describe the problem
The Java and Python frontends currently use different algorithms to generate TaskID
s and ObjectID
s. Ideally, they should both use the functions in src/ray/id.h
to generate UniqueID
s. This is the code that is currently shared between the Python frontend and the Raylet backend.
This problem manifests itself when the Raylet backend tries to compute the TaskID
of the task that generated a given ObjectID
. It does this, for instance, when trying to decide whether to reconstruct an object. As of #2526, the exact sequence of steps is:
- The
ReconstructionPolicy
is asked to reconstruct anobject_id
, which was computed with the code injava/runtime-common/src/main/java/org/ray/core/UniqueIdHelper.java
. - The
ReconstructionPolicy
computes the task ID fromobject_id
, but gets the wrong task ID, since it uses theComputeTaskId
helper function insrc/ray/id.h
to do so. It begins to listen for task lease notifications for the wrong task ID. - The
ReconstructionPolicy
soon times out the task since no notifications were received and attempts to reconstruct the task. However, it can't find theTaskSpec
since it has the wrong task ID.