{"action":"created","comment":{"url":"https://api.github.com/repos/ray-project/ray/pulls/comments/177862288","pull_request_review_id":107815531,"id":177862288,"diff_hunk":"@@ -0,0 +1,148 @@\n+#ifndef RAY_CONNECTION_POOL_H\n+#define RAY_CONNECTION_POOL_H\n+\n+#include <algorithm>\n+#include <cstdint>\n+#include <deque>\n+#include <map>\n+#include <memory>\n+#include <thread>\n+\n+#include <boost/asio.hpp>\n+#include <boost/asio/error.hpp>\n+#include <boost/bind.hpp>\n+\n+#include \"ray/id.h\"\n+#include \"ray/status.h\"\n+\n+#include \"format/object_manager_generated.h\"\n+#include \"object_directory.h\"\n+#include \"object_manager_client_connection.h\"\n+\n+namespace asio = boost::asio;\n+\n+namespace ray {\n+\n+class ConnectionPool {\n+ public:\n+  /// Callbacks for GetSender.\n+  using SuccessCallback = std::function<void(SenderConnection::pointer)>;\n+  using FailureCallback = std::function<void()>;\n+\n+  /// Connection type to distinguish between message and transfer connections.\n+  enum ConnectionType { MESSAGE = 0, TRANSFER };","path":"src/ray/object_manager/connection_pool.h","position":33,"original_position":33,"commit_id":"87e74e637eeebc12e754cac947fe071b1458e7de","original_commit_id":"f90b5039c976738be123e0fe91efde955c9efae2","user":{"login":"elibol","id":1884921,"avatar_url":"https://avatars1.githubusercontent.com/u/1884921?v=4","gravatar_id":"","url":"https://api.github.com/users/elibol","html_url":"https://github.com/elibol","followers_url":"https://api.github.com/users/elibol/followers","following_url":"https://api.github.com/users/elibol/following{/other_user}","gists_url":"https://api.github.com/users/elibol/gists{/gist_id}","starred_url":"https://api.github.com/users/elibol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elibol/subscriptions","organizations_url":"https://api.github.com/users/elibol/orgs","repos_url":"https://api.github.com/users/elibol/repos","events_url":"https://api.github.com/users/elibol/events{/privacy}","received_events_url":"https://api.github.com/users/elibol/received_events","type":"User","site_admin":false},"body":"I see. Do you have a type recommendation? In the mean time, I'll make this a strong-typed enum with underlying type `int`.","created_at":"2018-03-28T19:21:15Z","updated_at":"2018-03-28T19:21:15Z","html_url":"https://github.com/ray-project/ray/pull/1785#discussion_r177862288","pull_request_url":"https://api.github.com/repos/ray-project/ray/pulls/1785","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments/177862288"},"html":{"href":"https://github.com/ray-project/ray/pull/1785#discussion_r177862288"},"pull_request":{"href":"https://api.github.com/repos/ray-project/ray/pulls/1785"}},"in_reply_to_id":177315900},"pull_request":{"url":"https://api.github.com/repos/ray-project/ray/pulls/1785","id":177598718,"html_url":"https://github.com/ray-project/ray/pull/1785","diff_url":"https://github.com/ray-project/ray/pull/1785.diff","patch_url":"https://github.com/ray-project/ray/pull/1785.patch","issue_url":"https://api.github.com/repos/ray-project/ray/issues/1785","number":1785,"state":"open","locked":false,"title":"XRay Task Forwarding Milestone","user":{"login":"elibol","id":1884921,"avatar_url":"https://avatars1.githubusercontent.com/u/1884921?v=4","gravatar_id":"","url":"https://api.github.com/users/elibol","html_url":"https://github.com/elibol","followers_url":"https://api.github.com/users/elibol/followers","following_url":"https://api.github.com/users/elibol/following{/other_user}","gists_url":"https://api.github.com/users/elibol/gists{/gist_id}","starred_url":"https://api.github.com/users/elibol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elibol/subscriptions","organizations_url":"https://api.github.com/users/elibol/orgs","repos_url":"https://api.github.com/users/elibol/repos","events_url":"https://api.github.com/users/elibol/events{/privacy}","received_events_url":"https://api.github.com/users/elibol/received_events","type":"User","site_admin":false},"body":"**Summary:**\r\nAble to run 1000 tasks with object dependencies on a set of distributed Raylets.\r\n\r\n**Raylet Changes:**\r\n1. Finalized ClientConnection class.\r\n2. Task forwarding.\r\n3. NM-to-NM heartbeats.\r\n4. NM resource accounting for tasks.\r\n5. Simple scheduling policy with task forwarding.\r\n6. Creating and maintaining NM 2 NM long-lived connections and reusing them for task forwarding.\r\n\r\n**LineageCache Changes:**\r\n1. LineageCache without cleanup of tasks committed by remote nodes.\r\n2. Lineage cache writeback and cleanup implementation.\r\n\r\n**ObjectManager Changes:**\r\n1. Object manager event loop/ClientConnection refactor.\r\n2. Multithreaded object manager (disabled in this PR).\r\n\r\n**Testing Changes:**\r\n1. Integration tests for task submission on multiple Raylets.\r\n2. Stress tests for object manager (with GCS and object store integration).","created_at":"2018-03-26T23:59:49Z","updated_at":"2018-03-28T19:21:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8ea347b7ddc1334d8fa780a96be4077d142d930","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ray-project/ray/pulls/1785/commits","review_comments_url":"https://api.github.com/repos/ray-project/ray/pulls/1785/comments","review_comment_url":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ray-project/ray/issues/1785/comments","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/87e74e637eeebc12e754cac947fe071b1458e7de","head":{"label":"ray-project:xray-task-forwarding","ref":"xray-task-forwarding","sha":"87e74e637eeebc12e754cac947fe071b1458e7de","user":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71932349,"name":"ray","full_name":"ray-project/ray","owner":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ray-project/ray","description":"A high-performance distributed execution engine","fork":false,"url":"https://api.github.com/repos/ray-project/ray","forks_url":"https://api.github.com/repos/ray-project/ray/forks","keys_url":"https://api.github.com/repos/ray-project/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ray-project/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ray-project/ray/teams","hooks_url":"https://api.github.com/repos/ray-project/ray/hooks","issue_events_url":"https://api.github.com/repos/ray-project/ray/issues/events{/number}","events_url":"https://api.github.com/repos/ray-project/ray/events","assignees_url":"https://api.github.com/repos/ray-project/ray/assignees{/user}","branches_url":"https://api.github.com/repos/ray-project/ray/branches{/branch}","tags_url":"https://api.github.com/repos/ray-project/ray/tags","blobs_url":"https://api.github.com/repos/ray-project/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ray-project/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ray-project/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/ray-project/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/ray-project/ray/languages","stargazers_url":"https://api.github.com/repos/ray-project/ray/stargazers","contributors_url":"https://api.github.com/repos/ray-project/ray/contributors","subscribers_url":"https://api.github.com/repos/ray-project/ray/subscribers","subscription_url":"https://api.github.com/repos/ray-project/ray/subscription","commits_url":"https://api.github.com/repos/ray-project/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/ray-project/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/ray-project/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/ray-project/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/ray-project/ray/contents/{+path}","compare_url":"https://api.github.com/repos/ray-project/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ray-project/ray/merges","archive_url":"https://api.github.com/repos/ray-project/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ray-project/ray/downloads","issues_url":"https://api.github.com/repos/ray-project/ray/issues{/number}","pulls_url":"https://api.github.com/repos/ray-project/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/ray-project/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/ray-project/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ray-project/ray/labels{/name}","releases_url":"https://api.github.com/repos/ray-project/ray/releases{/id}","deployments_url":"https://api.github.com/repos/ray-project/ray/deployments","created_at":"2016-10-25T19:38:30Z","updated_at":"2018-03-28T18:20:28Z","pushed_at":"2018-03-28T07:51:27Z","git_url":"git://github.com/ray-project/ray.git","ssh_url":"git@github.com:ray-project/ray.git","clone_url":"https://github.com/ray-project/ray.git","svn_url":"https://github.com/ray-project/ray","homepage":"","size":10271,"stargazers_count":2837,"watchers_count":2837,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":368,"mirror_url":null,"archived":false,"open_issues_count":267,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":368,"open_issues":267,"watchers":2837,"default_branch":"master"}},"base":{"label":"ray-project:master","ref":"master","sha":"925e392b2d4a58cb0019e4b0fe80e758768189e4","user":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71932349,"name":"ray","full_name":"ray-project/ray","owner":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ray-project/ray","description":"A high-performance distributed execution engine","fork":false,"url":"https://api.github.com/repos/ray-project/ray","forks_url":"https://api.github.com/repos/ray-project/ray/forks","keys_url":"https://api.github.com/repos/ray-project/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ray-project/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ray-project/ray/teams","hooks_url":"https://api.github.com/repos/ray-project/ray/hooks","issue_events_url":"https://api.github.com/repos/ray-project/ray/issues/events{/number}","events_url":"https://api.github.com/repos/ray-project/ray/events","assignees_url":"https://api.github.com/repos/ray-project/ray/assignees{/user}","branches_url":"https://api.github.com/repos/ray-project/ray/branches{/branch}","tags_url":"https://api.github.com/repos/ray-project/ray/tags","blobs_url":"https://api.github.com/repos/ray-project/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ray-project/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ray-project/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/ray-project/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/ray-project/ray/languages","stargazers_url":"https://api.github.com/repos/ray-project/ray/stargazers","contributors_url":"https://api.github.com/repos/ray-project/ray/contributors","subscribers_url":"https://api.github.com/repos/ray-project/ray/subscribers","subscription_url":"https://api.github.com/repos/ray-project/ray/subscription","commits_url":"https://api.github.com/repos/ray-project/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/ray-project/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/ray-project/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/ray-project/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/ray-project/ray/contents/{+path}","compare_url":"https://api.github.com/repos/ray-project/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ray-project/ray/merges","archive_url":"https://api.github.com/repos/ray-project/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ray-project/ray/downloads","issues_url":"https://api.github.com/repos/ray-project/ray/issues{/number}","pulls_url":"https://api.github.com/repos/ray-project/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/ray-project/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/ray-project/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ray-project/ray/labels{/name}","releases_url":"https://api.github.com/repos/ray-project/ray/releases{/id}","deployments_url":"https://api.github.com/repos/ray-project/ray/deployments","created_at":"2016-10-25T19:38:30Z","updated_at":"2018-03-28T18:20:28Z","pushed_at":"2018-03-28T07:51:27Z","git_url":"git://github.com/ray-project/ray.git","ssh_url":"git@github.com:ray-project/ray.git","clone_url":"https://github.com/ray-project/ray.git","svn_url":"https://github.com/ray-project/ray","homepage":"","size":10271,"stargazers_count":2837,"watchers_count":2837,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":368,"mirror_url":null,"archived":false,"open_issues_count":267,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":368,"open_issues":267,"watchers":2837,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/1785"},"html":{"href":"https://github.com/ray-project/ray/pull/1785"},"issue":{"href":"https://api.github.com/repos/ray-project/ray/issues/1785"},"comments":{"href":"https://api.github.com/repos/ray-project/ray/issues/1785/comments"},"review_comments":{"href":"https://api.github.com/repos/ray-project/ray/pulls/1785/comments"},"review_comment":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ray-project/ray/pulls/1785/commits"},"statuses":{"href":"https://api.github.com/repos/ray-project/ray/statuses/87e74e637eeebc12e754cac947fe071b1458e7de"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"elibol"}}