{"action":"created","comment":{"url":"https://api.github.com/repos/ray-project/ray/pulls/comments/92098770","pull_request_review_id":12606495,"id":92098770,"diff_hunk":"@@ -153,22 +163,34 @@ db_handle *db_connect(const char *address,\n     freeReplyObject(reply);\n     reply = redisCommand(context, \"MULTI\");\n     freeReplyObject(reply);\n-    reply = redisCommand(\n-        context,\n-        \"HMSET db_clients:%b client_type %s address %s:%d db_client_id %b\",\n-        (char *) client.id, sizeof(client.id), client_type, client_addr,\n-        client_port, (char *) client.id, sizeof(client.id));\n+    reply = redisCommand(context,\n+                         \"HMSET db_clients:%b client_type %s address %s:%d \"\n+                         \"db_client_id %b aux_address %s\",\n+                         (char *) client.id, sizeof(client.id), client_type,\n+                         client_addr, client_port, (char *) client.id,\n+                         sizeof(client.id), aux_address);\n+    CHECK_REDIS_CONNECT(redisContext, context,\n+                        \"redis_db_connect failed on HMSET with aux_address\");\n+    CHECKM(reply != NULL, \"db_connect failed on HMSET\");\n+    /* allocate space for the published message */\n+    char *tmpbuf =\n+        malloc(strlen(client_type) + 1 + strlen(aux_address + 1 + 1));","path":"src/common/state/redis.c","position":46,"original_position":46,"commit_id":"ac46a2d8bba1de9d512759e0d0cb078e3b16d01b","original_commit_id":"226514961104015f13ed18caa838cdebb41c49f8","user":{"login":"pcmoritz","id":113316,"avatar_url":"https://avatars.githubusercontent.com/u/113316?v=3","gravatar_id":"","url":"https://api.github.com/users/pcmoritz","html_url":"https://github.com/pcmoritz","followers_url":"https://api.github.com/users/pcmoritz/followers","following_url":"https://api.github.com/users/pcmoritz/following{/other_user}","gists_url":"https://api.github.com/users/pcmoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmoritz/subscriptions","organizations_url":"https://api.github.com/users/pcmoritz/orgs","repos_url":"https://api.github.com/users/pcmoritz/repos","events_url":"https://api.github.com/users/pcmoritz/events{/privacy}","received_events_url":"https://api.github.com/users/pcmoritz/received_events","type":"User","site_admin":false},"body":"why the + 1 + 1 inside of the strlen argument?\r\n\r\nIf I think about it, why not get rid of tmpbuf altogether and do all the formatting in the redisCommand like\r\n\r\n\"%b:%s %s\"\r\n\r\n?","created_at":"2016-12-13T05:05:43Z","updated_at":"2016-12-13T05:19:49Z","html_url":"https://github.com/ray-project/ray/pull/123#discussion_r92098770","pull_request_url":"https://api.github.com/repos/ray-project/ray/pulls/123","_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments/92098770"},"html":{"href":"https://github.com/ray-project/ray/pull/123#discussion_r92098770"},"pull_request":{"href":"https://api.github.com/repos/ray-project/ray/pulls/123"}}},"pull_request":{"url":"https://api.github.com/repos/ray-project/ray/pulls/123","id":97684845,"html_url":"https://github.com/ray-project/ray/pull/123","diff_url":"https://github.com/ray-project/ray/pull/123.diff","patch_url":"https://github.com/ray-project/ray/pull/123.patch","issue_url":"https://api.github.com/repos/ray-project/ray/issues/123","number":123,"state":"open","locked":false,"title":"Plasma photon association: passing through plasma address with photon db connection","user":{"login":"atumanov","id":1316372,"avatar_url":"https://avatars.githubusercontent.com/u/1316372?v=3","gravatar_id":"","url":"https://api.github.com/users/atumanov","html_url":"https://github.com/atumanov","followers_url":"https://api.github.com/users/atumanov/followers","following_url":"https://api.github.com/users/atumanov/following{/other_user}","gists_url":"https://api.github.com/users/atumanov/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanov/subscriptions","organizations_url":"https://api.github.com/users/atumanov/orgs","repos_url":"https://api.github.com/users/atumanov/repos","events_url":"https://api.github.com/users/atumanov/events{/privacy}","received_events_url":"https://api.github.com/users/atumanov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-13T04:29:25Z","updated_at":"2016-12-13T05:19:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"474e89578c4f9cd96759485e91ced10e0efe7f60","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ray-project/ray/pulls/123/commits","review_comments_url":"https://api.github.com/repos/ray-project/ray/pulls/123/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/123/comments","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/ac46a2d8bba1de9d512759e0d0cb078e3b16d01b","head":{"label":"atumanov:plasma-photon-association","ref":"plasma-photon-association","sha":"ac46a2d8bba1de9d512759e0d0cb078e3b16d01b","user":{"login":"atumanov","id":1316372,"avatar_url":"https://avatars.githubusercontent.com/u/1316372?v=3","gravatar_id":"","url":"https://api.github.com/users/atumanov","html_url":"https://github.com/atumanov","followers_url":"https://api.github.com/users/atumanov/followers","following_url":"https://api.github.com/users/atumanov/following{/other_user}","gists_url":"https://api.github.com/users/atumanov/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanov/subscriptions","organizations_url":"https://api.github.com/users/atumanov/orgs","repos_url":"https://api.github.com/users/atumanov/repos","events_url":"https://api.github.com/users/atumanov/events{/privacy}","received_events_url":"https://api.github.com/users/atumanov/received_events","type":"User","site_admin":false},"repo":{"id":73953484,"name":"ray","full_name":"atumanov/ray","owner":{"login":"atumanov","id":1316372,"avatar_url":"https://avatars.githubusercontent.com/u/1316372?v=3","gravatar_id":"","url":"https://api.github.com/users/atumanov","html_url":"https://github.com/atumanov","followers_url":"https://api.github.com/users/atumanov/followers","following_url":"https://api.github.com/users/atumanov/following{/other_user}","gists_url":"https://api.github.com/users/atumanov/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanov/subscriptions","organizations_url":"https://api.github.com/users/atumanov/orgs","repos_url":"https://api.github.com/users/atumanov/repos","events_url":"https://api.github.com/users/atumanov/events{/privacy}","received_events_url":"https://api.github.com/users/atumanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atumanov/ray","description":null,"fork":true,"url":"https://api.github.com/repos/atumanov/ray","forks_url":"https://api.github.com/repos/atumanov/ray/forks","keys_url":"https://api.github.com/repos/atumanov/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atumanov/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atumanov/ray/teams","hooks_url":"https://api.github.com/repos/atumanov/ray/hooks","issue_events_url":"https://api.github.com/repos/atumanov/ray/issues/events{/number}","events_url":"https://api.github.com/repos/atumanov/ray/events","assignees_url":"https://api.github.com/repos/atumanov/ray/assignees{/user}","branches_url":"https://api.github.com/repos/atumanov/ray/branches{/branch}","tags_url":"https://api.github.com/repos/atumanov/ray/tags","blobs_url":"https://api.github.com/repos/atumanov/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atumanov/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atumanov/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/atumanov/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atumanov/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/atumanov/ray/languages","stargazers_url":"https://api.github.com/repos/atumanov/ray/stargazers","contributors_url":"https://api.github.com/repos/atumanov/ray/contributors","subscribers_url":"https://api.github.com/repos/atumanov/ray/subscribers","subscription_url":"https://api.github.com/repos/atumanov/ray/subscription","commits_url":"https://api.github.com/repos/atumanov/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/atumanov/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/atumanov/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/atumanov/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/atumanov/ray/contents/{+path}","compare_url":"https://api.github.com/repos/atumanov/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atumanov/ray/merges","archive_url":"https://api.github.com/repos/atumanov/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atumanov/ray/downloads","issues_url":"https://api.github.com/repos/atumanov/ray/issues{/number}","pulls_url":"https://api.github.com/repos/atumanov/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/atumanov/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/atumanov/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atumanov/ray/labels{/name}","releases_url":"https://api.github.com/repos/atumanov/ray/releases{/id}","deployments_url":"https://api.github.com/repos/atumanov/ray/deployments","created_at":"2016-11-16T19:27:15Z","updated_at":"2016-11-16T19:27:16Z","pushed_at":"2016-12-13T05:14:21Z","git_url":"git://github.com/atumanov/ray.git","ssh_url":"git@github.com:atumanov/ray.git","clone_url":"https://github.com/atumanov/ray.git","svn_url":"https://github.com/atumanov/ray","homepage":null,"size":2320,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ray-project:master","ref":"master","sha":"817f1e730c84b1cf25050866a3be2c0719bd7711","user":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars.githubusercontent.com/u/22125274?v=3","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://avatars.githubusercontent.com/u/22125274?v=3","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":null,"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":"2016-11-30T07:20:02Z","pushed_at":"2016-12-13T05:14:22Z","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":null,"size":2903,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/123"},"html":{"href":"https://github.com/ray-project/ray/pull/123"},"issue":{"href":"https://api.github.com/repos/ray-project/ray/issues/123"},"comments":{"href":"https://api.github.com/repos/ray-project/ray/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/ray-project/ray/pulls/123/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/123/commits"},"statuses":{"href":"https://api.github.com/repos/ray-project/ray/statuses/ac46a2d8bba1de9d512759e0d0cb078e3b16d01b"}}}}
{"actor":{"display_login":"pcmoritz"}}