Skip to content

Commit

Permalink
[Core]Clear the unnecessary fields before broadcasting (#20965)
Browse files Browse the repository at this point in the history
Only `resource_avaialbe` and `resource_total` are used in raylet, so let's clear the rest before broadcasting.
  • Loading branch information
WangTaoTheTonic authored Jan 3, 2022
1 parent 7efe1be commit b910648
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ray/gcs/gcs_server/gcs_resource_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ void GcsResourceManager::UpdateFromResourceReport(const rpc::ResourcesData &data
resources_data->resource_load_changed()) {
absl::MutexLock guard(&resource_buffer_mutex_);
resources_buffer_[node_id] = *resources_data;
// Clear the fields that will not be used by raylet.
resources_buffer_[node_id].clear_resource_load();
resources_buffer_[node_id].clear_resource_load_by_shape();
resources_buffer_[node_id].clear_resources_normal_task();
}
}

Expand Down

0 comments on commit b910648

Please sign in to comment.