Skip to content
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

[core] Fix gcs member dependency order #49482

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

dentiny
Copy link
Contributor

@dentiny dentiny commented Dec 29, 2024

Two changes in this PR:

  • Fix GCS data member declaration order based on their dependency (node manager depends on publisher)
  • Use std::deque instead of std::list to manage dead node list

Signed-off-by: dentiny <dentinyhao@gmail.com>
@dentiny dentiny added the go add ONLY when ready to merge, run all tests label Dec 29, 2024
@dentiny dentiny requested a review from a team as a code owner December 29, 2024 05:25
@@ -235,8 +235,8 @@ class GcsNodeManager : public rpc::NodeInfoHandler {
/// Dead nodes.
absl::flat_hash_map<NodeID, std::shared_ptr<rpc::GcsNodeInfo>> dead_nodes_;
/// The nodes are sorted according to the timestamp, and the oldest is at the head of
/// the list.
std::list<std::pair<NodeID, int64_t>> sorted_dead_node_list_;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::list should be ONLY used when insertion / deletion in the middle is a necessary operation.

@jjyao jjyao enabled auto-merge (squash) December 29, 2024 05:35
@jjyao jjyao merged commit 8c2d945 into ray-project:master Dec 29, 2024
5 checks passed
justinvyu pushed a commit to justinvyu/ray that referenced this pull request Dec 30, 2024
Signed-off-by: dentiny <dentinyhao@gmail.com>
srinathk10 pushed a commit that referenced this pull request Jan 3, 2025
Signed-off-by: dentiny <dentinyhao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants