{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/218887201","pull_request_review_id":156926959,"id":218887201,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODg4NzIwMQ==","diff_hunk":"@@ -50,6 +50,7 @@ void grpc_tsi_alts_init() {\n   g_alts_resource.is_cq_drained = false;\n   gpr_mu_init(&g_alts_resource.mu);\n   gpr_cv_init(&g_alts_resource.cv);\n+  gpr_ref_init(&g_alts_resource.refcount, 0);\n }\n \n void grpc_tsi_alts_shutdown() {","path":"src/core/tsi/alts_transport_security.cc","position":7,"original_position":7,"commit_id":"9e1e91f38186cbd85de9f287a07ba7e013ed94d4","original_commit_id":"9e1e91f38186cbd85de9f287a07ba7e013ed94d4","user":{"login":"markdroth","id":18664614,"node_id":"MDQ6VXNlcjE4NjY0NjE0","avatar_url":"https://avatars2.githubusercontent.com/u/18664614?v=4","gravatar_id":"","url":"https://api.github.com/users/markdroth","html_url":"https://github.com/markdroth","followers_url":"https://api.github.com/users/markdroth/followers","following_url":"https://api.github.com/users/markdroth/following{/other_user}","gists_url":"https://api.github.com/users/markdroth/gists{/gist_id}","starred_url":"https://api.github.com/users/markdroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdroth/subscriptions","organizations_url":"https://api.github.com/users/markdroth/orgs","repos_url":"https://api.github.com/users/markdroth/repos","events_url":"https://api.github.com/users/markdroth/events{/privacy}","received_events_url":"https://api.github.com/users/markdroth/received_events","type":"User","site_admin":false},"body":"If this gets called, then we will shut down the resources even if the refcount hasn't gone to zero.","created_at":"2018-09-19T17:08:02Z","updated_at":"2018-09-19T17:09:23Z","html_url":"https://github.com/grpc/grpc/pull/16654#discussion_r218887201","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/16654","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/218887201"},"html":{"href":"https://github.com/grpc/grpc/pull/16654#discussion_r218887201"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/16654"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/16654","id":216709785,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NzA5Nzg1","html_url":"https://github.com/grpc/grpc/pull/16654","diff_url":"https://github.com/grpc/grpc/pull/16654.diff","patch_url":"https://github.com/grpc/grpc/pull/16654.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/16654","number":16654,"state":"open","locked":false,"title":"add ref count to alts shared resource.","user":{"login":"yihuazhang","id":26934891,"node_id":"MDQ6VXNlcjI2OTM0ODkx","avatar_url":"https://avatars2.githubusercontent.com/u/26934891?v=4","gravatar_id":"","url":"https://api.github.com/users/yihuazhang","html_url":"https://github.com/yihuazhang","followers_url":"https://api.github.com/users/yihuazhang/followers","following_url":"https://api.github.com/users/yihuazhang/following{/other_user}","gists_url":"https://api.github.com/users/yihuazhang/gists{/gist_id}","starred_url":"https://api.github.com/users/yihuazhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihuazhang/subscriptions","organizations_url":"https://api.github.com/users/yihuazhang/orgs","repos_url":"https://api.github.com/users/yihuazhang/repos","events_url":"https://api.github.com/users/yihuazhang/events{/privacy}","received_events_url":"https://api.github.com/users/yihuazhang/received_events","type":"User","site_admin":false},"body":"This PR adds a ref count to ALTS shared resources, and ref (unref) it whenever creating (destroying) alts server/channel credentials. It will resolve ALTS (and google default creds) test flakiness. \r\n\r\nI will prepare another PR later on that removes the TSI thread from gRPC use cases.","created_at":"2018-09-19T16:57:42Z","updated_at":"2018-09-19T17:09:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ed9b05f12507d4ae776ab943f74596494534d45","assignee":null,"assignees":[],"requested_reviewers":[{"login":"apolcyn","id":9566254,"node_id":"MDQ6VXNlcjk1NjYyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9566254?v=4","gravatar_id":"","url":"https://api.github.com/users/apolcyn","html_url":"https://github.com/apolcyn","followers_url":"https://api.github.com/users/apolcyn/followers","following_url":"https://api.github.com/users/apolcyn/following{/other_user}","gists_url":"https://api.github.com/users/apolcyn/gists{/gist_id}","starred_url":"https://api.github.com/users/apolcyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apolcyn/subscriptions","organizations_url":"https://api.github.com/users/apolcyn/orgs","repos_url":"https://api.github.com/users/apolcyn/repos","events_url":"https://api.github.com/users/apolcyn/events{/privacy}","received_events_url":"https://api.github.com/users/apolcyn/received_events","type":"User","site_admin":false},{"login":"jiangtaoli2016","id":19913700,"node_id":"MDQ6VXNlcjE5OTEzNzAw","avatar_url":"https://avatars2.githubusercontent.com/u/19913700?v=4","gravatar_id":"","url":"https://api.github.com/users/jiangtaoli2016","html_url":"https://github.com/jiangtaoli2016","followers_url":"https://api.github.com/users/jiangtaoli2016/followers","following_url":"https://api.github.com/users/jiangtaoli2016/following{/other_user}","gists_url":"https://api.github.com/users/jiangtaoli2016/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangtaoli2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangtaoli2016/subscriptions","organizations_url":"https://api.github.com/users/jiangtaoli2016/orgs","repos_url":"https://api.github.com/users/jiangtaoli2016/repos","events_url":"https://api.github.com/users/jiangtaoli2016/events{/privacy}","received_events_url":"https://api.github.com/users/jiangtaoli2016/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":961832073,"node_id":"MDU6TGFiZWw5NjE4MzIwNzM=","url":"https://api.github.com/repos/grpc/grpc/labels/release%20notes:%20no","name":"release notes: no","color":"0f5f75","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/16654/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/16654/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/16654/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/9e1e91f38186cbd85de9f287a07ba7e013ed94d4","head":{"label":"yihuazhang:alts_ref_count","ref":"alts_ref_count","sha":"9e1e91f38186cbd85de9f287a07ba7e013ed94d4","user":{"login":"yihuazhang","id":26934891,"node_id":"MDQ6VXNlcjI2OTM0ODkx","avatar_url":"https://avatars2.githubusercontent.com/u/26934891?v=4","gravatar_id":"","url":"https://api.github.com/users/yihuazhang","html_url":"https://github.com/yihuazhang","followers_url":"https://api.github.com/users/yihuazhang/followers","following_url":"https://api.github.com/users/yihuazhang/following{/other_user}","gists_url":"https://api.github.com/users/yihuazhang/gists{/gist_id}","starred_url":"https://api.github.com/users/yihuazhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihuazhang/subscriptions","organizations_url":"https://api.github.com/users/yihuazhang/orgs","repos_url":"https://api.github.com/users/yihuazhang/repos","events_url":"https://api.github.com/users/yihuazhang/events{/privacy}","received_events_url":"https://api.github.com/users/yihuazhang/received_events","type":"User","site_admin":false},"repo":{"id":102912857,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI5MTI4NTc=","name":"grpc","full_name":"yihuazhang/grpc","private":false,"owner":{"login":"yihuazhang","id":26934891,"node_id":"MDQ6VXNlcjI2OTM0ODkx","avatar_url":"https://avatars2.githubusercontent.com/u/26934891?v=4","gravatar_id":"","url":"https://api.github.com/users/yihuazhang","html_url":"https://github.com/yihuazhang","followers_url":"https://api.github.com/users/yihuazhang/followers","following_url":"https://api.github.com/users/yihuazhang/following{/other_user}","gists_url":"https://api.github.com/users/yihuazhang/gists{/gist_id}","starred_url":"https://api.github.com/users/yihuazhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihuazhang/subscriptions","organizations_url":"https://api.github.com/users/yihuazhang/orgs","repos_url":"https://api.github.com/users/yihuazhang/repos","events_url":"https://api.github.com/users/yihuazhang/events{/privacy}","received_events_url":"https://api.github.com/users/yihuazhang/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yihuazhang/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/yihuazhang/grpc","forks_url":"https://api.github.com/repos/yihuazhang/grpc/forks","keys_url":"https://api.github.com/repos/yihuazhang/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yihuazhang/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yihuazhang/grpc/teams","hooks_url":"https://api.github.com/repos/yihuazhang/grpc/hooks","issue_events_url":"https://api.github.com/repos/yihuazhang/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/yihuazhang/grpc/events","assignees_url":"https://api.github.com/repos/yihuazhang/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/yihuazhang/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/yihuazhang/grpc/tags","blobs_url":"https://api.github.com/repos/yihuazhang/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yihuazhang/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yihuazhang/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/yihuazhang/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yihuazhang/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/yihuazhang/grpc/languages","stargazers_url":"https://api.github.com/repos/yihuazhang/grpc/stargazers","contributors_url":"https://api.github.com/repos/yihuazhang/grpc/contributors","subscribers_url":"https://api.github.com/repos/yihuazhang/grpc/subscribers","subscription_url":"https://api.github.com/repos/yihuazhang/grpc/subscription","commits_url":"https://api.github.com/repos/yihuazhang/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/yihuazhang/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/yihuazhang/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/yihuazhang/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/yihuazhang/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/yihuazhang/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yihuazhang/grpc/merges","archive_url":"https://api.github.com/repos/yihuazhang/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yihuazhang/grpc/downloads","issues_url":"https://api.github.com/repos/yihuazhang/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/yihuazhang/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/yihuazhang/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/yihuazhang/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yihuazhang/grpc/labels{/name}","releases_url":"https://api.github.com/repos/yihuazhang/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/yihuazhang/grpc/deployments","created_at":"2017-09-08T23:36:50Z","updated_at":"2017-09-08T23:37:03Z","pushed_at":"2018-09-19T16:53:45Z","git_url":"git://github.com/yihuazhang/grpc.git","ssh_url":"git@github.com:yihuazhang/grpc.git","clone_url":"https://github.com/yihuazhang/grpc.git","svn_url":"https://github.com/yihuazhang/grpc","homepage":"","size":174874,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"d177c8fe46c2550133199f71714c23ff0df8d38a","user":{"login":"grpc","id":7802525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4MDI1MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"node_id":"MDEwOlJlcG9zaXRvcnkyNzcyOTg4MA==","name":"grpc","full_name":"grpc/grpc","private":false,"owner":{"login":"grpc","id":7802525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4MDI1MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc/deployments","created_at":"2014-12-08T18:58:53Z","updated_at":"2018-09-19T16:41:22Z","pushed_at":"2018-09-19T16:57:43Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"https://grpc.io","size":193047,"stargazers_count":17191,"watchers_count":17191,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":3910,"mirror_url":null,"archived":false,"open_issues_count":1042,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3910,"open_issues":1042,"watchers":17191,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/16654"},"html":{"href":"https://github.com/grpc/grpc/pull/16654"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/16654"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/16654/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/16654/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/16654/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/9e1e91f38186cbd85de9f287a07ba7e013ed94d4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"markdroth"}}