mirror of
https://github.com/wassname/ray.git
synced 2026-08-04 13:14:14 +08:00
Merge task table and task log into a single table (#30)
* Merge task table and task log * Fix test in db tests * Address Robert's comments and some better error checking * Add a LOG_FATAL that exits the program
This commit is contained in:
committed by
Philipp Moritz
parent
194bdb1d96
commit
9d1e750e8f
@@ -3,6 +3,7 @@
|
||||
A *task specification* contains all information that is needed for computing
|
||||
the results of a task:
|
||||
|
||||
- The ID of the task
|
||||
- The function ID of the function that executes the task
|
||||
- The arguments (either object IDs for pass by reference
|
||||
or values for pass by value)
|
||||
@@ -11,23 +12,21 @@ or values for pass by value)
|
||||
From these, a task ID can be computed which is also stored in the task
|
||||
specification.
|
||||
|
||||
A *task instance* represents one execution of a task specification.
|
||||
A *task* represents the execution of a task specification.
|
||||
It consists of:
|
||||
|
||||
- A scheduling state (WAITING, SCHEDULED, RUNNING, DONE)
|
||||
- The target node where the task is scheduled or executed
|
||||
- A unique task instance ID that identifies the particular execution
|
||||
of the task.
|
||||
- The task specification
|
||||
|
||||
The task data structures are defined in `common/task.h`.
|
||||
|
||||
The *task log* is a mapping from the task instance ID to a sequence of
|
||||
updates to the status of the task instance. It is updated by various parts
|
||||
of the system:
|
||||
The *task table* is a mapping from the task ID to the *task* information. It is
|
||||
updated by various parts of the system:
|
||||
|
||||
1. The local scheduler writes it with status WAITING when submits a task to the global scheduler
|
||||
2. The global scheduler appends an update WAITING -> SCHEDULED together with the node ID when assigning the task to a local scheduler
|
||||
3. The local scheduler appends an update SCHEDULED -> RUNNING when it assigns a task to a worker
|
||||
4. The local scheduler appends an update RUNNING -> DONE when the task finishes execution
|
||||
|
||||
The task log is defined in `common/state/task_log.h`.
|
||||
The task table is defined in `common/state/task_table.h`.
|
||||
|
||||
Reference in New Issue
Block a user