-
Notifications
You must be signed in to change notification settings - Fork 6.5k
[xray] Workers blocked in a ray.get
release their resources
#1920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e43765e
f04cad8
f27e12e
9192d9c
3fbe5b8
670f965
81c0923
137f69c
b8eb6e2
32c282b
fce4de8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,14 @@ Worker::Worker(pid_t pid, std::shared_ptr<LocalClientConnection> connection) | |
: pid_(pid), | ||
connection_(connection), | ||
assigned_task_id_(TaskID::nil()), | ||
actor_id_(ActorID::nil()) {} | ||
actor_id_(ActorID::nil()), | ||
blocked_(false) {} | ||
|
||
void Worker::MarkBlocked() { blocked_ = true; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor: |
||
|
||
void Worker::MarkUnblocked() { blocked_ = false; } | ||
|
||
bool Worker::IsBlocked() const { return blocked_; } | ||
|
||
pid_t Worker::Pid() const { return pid_; } | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ class Worker { | |
Worker(pid_t pid, std::shared_ptr<LocalClientConnection> connection); | ||
/// A destructor responsible for freeing all worker state. | ||
~Worker() {} | ||
void MarkBlocked(); | ||
void MarkUnblocked(); | ||
bool IsBlocked() const; | ||
/// Return the worker's PID. | ||
pid_t Pid() const; | ||
void AssignTaskId(const TaskID &task_id); | ||
|
@@ -37,6 +40,9 @@ class Worker { | |
TaskID assigned_task_id_; | ||
/// The worker's actor ID. If this is nil, then the worker is not an actor. | ||
ActorID actor_id_; | ||
/// Whether the worker is blocked. Workers become blocked in a `ray.get`, if | ||
/// they require a data dependency while executing a task. | ||
bool blocked_; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ideally, we would make it |
||
}; | ||
|
||
} // namespace raylet | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ref:
const auto &