{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/citus/pulls/comments/93212201","pull_request_review_id":13732952,"id":93212201,"diff_hunk":"@@ -764,16 +765,24 @@ ExecuteSingleTask(QueryDesc *queryDesc, Task *task,\n \t\tShardPlacement *taskPlacement = (ShardPlacement *) lfirst(taskPlacementCell);\n \t\tbool queryOK = false;\n \t\tbool failOnError = false;\n+\t\tPGconn *connection = NULL;\n \t\tint64 currentAffectedTupleCount = 0;\n-\t\tPGconn *connection = GetConnectionForPlacement(taskPlacement,\n-\t\t\t\t\t\t\t\t\t\t\t\t\t   isModificationQuery);\n-\n-\t\tif (connection == NULL)\n+\t\tint connectionFlags = SESSION_LIFESPAN;\n+\t\tMultiConnection *multiConnection = GetNodeConnection(connectionFlags,\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t taskPlacement->nodeName,\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t taskPlacement->nodePort);\n+\t\tif (multiConnection == NULL)","path":"src/backend/distributed/executor/multi_router_executor.c","position":26,"original_position":26,"commit_id":"31967eba535cc99567f5bbb10a01cf4a47222cda","original_commit_id":"31967eba535cc99567f5bbb10a01cf4a47222cda","user":{"login":"anarazel","id":1598211,"avatar_url":"https://avatars.githubusercontent.com/u/1598211?v=3","gravatar_id":"","url":"https://api.github.com/users/anarazel","html_url":"https://github.com/anarazel","followers_url":"https://api.github.com/users/anarazel/followers","following_url":"https://api.github.com/users/anarazel/following{/other_user}","gists_url":"https://api.github.com/users/anarazel/gists{/gist_id}","starred_url":"https://api.github.com/users/anarazel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarazel/subscriptions","organizations_url":"https://api.github.com/users/anarazel/orgs","repos_url":"https://api.github.com/users/anarazel/repos","events_url":"https://api.github.com/users/anarazel/events{/privacy}","received_events_url":"https://api.github.com/users/anarazel/received_events","type":"User","site_admin":false},"body":"Node that you *always* get back a multiConnection, so this test isn't really meaningful.  If you want to actually test the health you'd need to copy the test from GetOrEstablishConnection().","created_at":"2016-12-20T10:44:50Z","updated_at":"2016-12-20T10:44:56Z","html_url":"https://github.com/citusdata/citus/pull/1053#discussion_r93212201","pull_request_url":"https://api.github.com/repos/citusdata/citus/pulls/1053","_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments/93212201"},"html":{"href":"https://github.com/citusdata/citus/pull/1053#discussion_r93212201"},"pull_request":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1053"}}},"pull_request":{"url":"https://api.github.com/repos/citusdata/citus/pulls/1053","id":98702895,"html_url":"https://github.com/citusdata/citus/pull/1053","diff_url":"https://github.com/citusdata/citus/pull/1053.diff","patch_url":"https://github.com/citusdata/citus/pull/1053.patch","issue_url":"https://api.github.com/repos/citusdata/citus/issues/1053","number":1053,"state":"open","locked":false,"title":"Convert router executor to use the new connection API","user":{"login":"onderkalaci","id":7829470,"avatar_url":"https://avatars.githubusercontent.com/u/7829470?v=3","gravatar_id":"","url":"https://api.github.com/users/onderkalaci","html_url":"https://github.com/onderkalaci","followers_url":"https://api.github.com/users/onderkalaci/followers","following_url":"https://api.github.com/users/onderkalaci/following{/other_user}","gists_url":"https://api.github.com/users/onderkalaci/gists{/gist_id}","starred_url":"https://api.github.com/users/onderkalaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onderkalaci/subscriptions","organizations_url":"https://api.github.com/users/onderkalaci/orgs","repos_url":"https://api.github.com/users/onderkalaci/repos","events_url":"https://api.github.com/users/onderkalaci/events{/privacy}","received_events_url":"https://api.github.com/users/onderkalaci/received_events","type":"User","site_admin":false},"body":"Partially implements #873 \r\n\r\nThis commit slightly changes router executor to use new connection API\r\nfor getting the connections.\r\n\r\n\r\nOne question for the PR is the following:\r\n\r\nDo we want/expected to change the function signature for all router executor function such as \r\n\r\n```C\r\nstatic bool\r\nStoreQueryResult(MaterialState *routerState, PGconn *connection,\r\n\t\t\t\t TupleDesc tupleDescriptor, bool failOnError, int64 *rows)\r\n```\r\n\r\n```C\r\nstatic bool\r\nStoreQueryResult(MaterialState *routerState, MultiConnection *connection,\r\n\t\t\t\t TupleDesc tupleDescriptor, bool failOnError, int64 *rows)\r\n```\r\n\r\nAnd always use `MultiConnection` everywhere? Or keeping low-level functions to use `PGconn *` is OK?\r\n\r\n(From my point of view, that is OK but wanted to bring up anyway)","created_at":"2016-12-20T08:07:12Z","updated_at":"2016-12-20T10:44:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1258b72c762d134b5fc9bc6ec271ba842cb679f","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/citusdata/citus/milestones/7","html_url":"https://github.com/citusdata/citus/milestone/7","labels_url":"https://api.github.com/repos/citusdata/citus/milestones/7/labels","id":1954961,"number":7,"title":"6.1 Release","description":"","creator":{"login":"lithp","id":466333,"avatar_url":"https://avatars.githubusercontent.com/u/466333?v=3","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":12,"state":"open","created_at":"2016-08-22T11:09:37Z","updated_at":"2016-12-20T08:56:13Z","due_on":"2017-01-09T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/citusdata/citus/pulls/1053/commits","review_comments_url":"https://api.github.com/repos/citusdata/citus/pulls/1053/comments","review_comment_url":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citusdata/citus/issues/1053/comments","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/31967eba535cc99567f5bbb10a01cf4a47222cda","head":{"label":"citusdata:convert_router_executor","ref":"convert_router_executor","sha":"31967eba535cc99567f5bbb10a01cf4a47222cda","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-12-20T10:22:43Z","pushed_at":"2016-12-20T10:23:00Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":4230,"stargazers_count":1760,"watchers_count":1760,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":440,"forks":119,"open_issues":440,"watchers":1760,"default_branch":"master"}},"base":{"label":"citusdata:master","ref":"master","sha":"4914ccbaba05cd6ec03e933be8ee74dd206cb3ed","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-12-20T10:22:43Z","pushed_at":"2016-12-20T10:23:00Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":4230,"stargazers_count":1760,"watchers_count":1760,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":440,"forks":119,"open_issues":440,"watchers":1760,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1053"},"html":{"href":"https://github.com/citusdata/citus/pull/1053"},"issue":{"href":"https://api.github.com/repos/citusdata/citus/issues/1053"},"comments":{"href":"https://api.github.com/repos/citusdata/citus/issues/1053/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1053/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1053/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/citus/statuses/31967eba535cc99567f5bbb10a01cf4a47222cda"}}}}
{"actor":{"display_login":"anarazel"}}