{"action":"created","comment":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/255678987","pull_request_review_id":202319346,"id":255678987,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1NTY3ODk4Nw==","diff_hunk":"@@ -51,10 +54,21 @@ template <typename KEY_TYPE, typename POOL_TYPE> class ConnPoolMap {\n   void drainConnections();\n \n private:\n+  void poolDrained(const KEY_TYPE& key);\n+  void registerFullCallbacks();\n+  /**\n+   * Removes resources allocated to any drained pools.\n+   * @return false if no pools were drained.\n+   */\n+  bool cleanDrainedPools();\n+\n   absl::flat_hash_map<KEY_TYPE, std::unique_ptr<POOL_TYPE>> active_pools_;\n+  std::vector<KEY_TYPE> drained_pools_;\n   Event::Dispatcher& thread_local_dispatcher_;\n   std::vector<DrainedCb> cached_callbacks_;\n   Common::DebugRecursionChecker recursion_checker_;\n+  absl::optional<uint64_t> max_size_;","path":"source/common/upstream/conn_pool_map.h","position":51,"original_position":51,"commit_id":"cf5dad6c3047f945ec8ae2f49a9f76fd6b9dceca","original_commit_id":"cf5dad6c3047f945ec8ae2f49a9f76fd6b9dceca","user":{"login":"mattklein123","id":6305260,"node_id":"MDQ6VXNlcjYzMDUyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6305260?v=4","gravatar_id":"","url":"https://api.github.com/users/mattklein123","html_url":"https://github.com/mattklein123","followers_url":"https://api.github.com/users/mattklein123/followers","following_url":"https://api.github.com/users/mattklein123/following{/other_user}","gists_url":"https://api.github.com/users/mattklein123/gists{/gist_id}","starred_url":"https://api.github.com/users/mattklein123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattklein123/subscriptions","organizations_url":"https://api.github.com/users/mattklein123/orgs","repos_url":"https://api.github.com/users/mattklein123/repos","events_url":"https://api.github.com/users/mattklein123/events{/privacy}","received_events_url":"https://api.github.com/users/mattklein123/received_events","type":"User","site_admin":false},"body":"nit: const","created_at":"2019-02-11T20:25:10Z","updated_at":"2019-02-11T20:31:20Z","html_url":"https://github.com/envoyproxy/envoy/pull/5861#discussion_r255678987","pull_request_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/255678987"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/5861#discussion_r255678987"},"pull_request":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861"}}},"pull_request":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861","id":250829178,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUwODI5MTc4","html_url":"https://github.com/envoyproxy/envoy/pull/5861","diff_url":"https://github.com/envoyproxy/envoy/pull/5861.diff","patch_url":"https://github.com/envoyproxy/envoy/pull/5861.patch","issue_url":"https://api.github.com/repos/envoyproxy/envoy/issues/5861","number":5861,"state":"open","locked":false,"title":"upstream: add limits to connection pool map","user":{"login":"klarose","id":23175939,"node_id":"MDQ6VXNlcjIzMTc1OTM5","avatar_url":"https://avatars1.githubusercontent.com/u/23175939?v=4","gravatar_id":"","url":"https://api.github.com/users/klarose","html_url":"https://github.com/klarose","followers_url":"https://api.github.com/users/klarose/followers","following_url":"https://api.github.com/users/klarose/following{/other_user}","gists_url":"https://api.github.com/users/klarose/gists{/gist_id}","starred_url":"https://api.github.com/users/klarose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarose/subscriptions","organizations_url":"https://api.github.com/users/klarose/orgs","repos_url":"https://api.github.com/users/klarose/repos","events_url":"https://api.github.com/users/klarose/events{/privacy}","received_events_url":"https://api.github.com/users/klarose/received_events","type":"User","site_admin":false},"body":"*Description*: Add limits to the connection pool map in preparation for actually configuring them. They default to disabled, and there is no way yet to configure them in a production build, so there should be no impact to the actual system right now. However, I have done extensive UT of the new code, so it should work fairly well.\r\n\r\nThe final steps in this process to get it actually working will be to implement a method to configure the limits, and handle them failing in `ClusterManagerImpl`.\r\n\r\n*Risk Level*: Medium. Should be no functional change, but it's in the main http path.\r\n*Testing*: Lots of UT\r\n*Docs Changes*: None\r\n*Release Notes*: None\r\n\r\n","created_at":"2019-02-06T16:50:56Z","updated_at":"2019-02-11T20:31:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"627c8bcd1b5efedae785bb4a2e2896653b34a6e6","assignee":{"login":"junr03","id":6007532,"node_id":"MDQ6VXNlcjYwMDc1MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6007532?v=4","gravatar_id":"","url":"https://api.github.com/users/junr03","html_url":"https://github.com/junr03","followers_url":"https://api.github.com/users/junr03/followers","following_url":"https://api.github.com/users/junr03/following{/other_user}","gists_url":"https://api.github.com/users/junr03/gists{/gist_id}","starred_url":"https://api.github.com/users/junr03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junr03/subscriptions","organizations_url":"https://api.github.com/users/junr03/orgs","repos_url":"https://api.github.com/users/junr03/repos","events_url":"https://api.github.com/users/junr03/events{/privacy}","received_events_url":"https://api.github.com/users/junr03/received_events","type":"User","site_admin":false},"assignees":[{"login":"junr03","id":6007532,"node_id":"MDQ6VXNlcjYwMDc1MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6007532?v=4","gravatar_id":"","url":"https://api.github.com/users/junr03","html_url":"https://github.com/junr03","followers_url":"https://api.github.com/users/junr03/followers","following_url":"https://api.github.com/users/junr03/following{/other_user}","gists_url":"https://api.github.com/users/junr03/gists{/gist_id}","starred_url":"https://api.github.com/users/junr03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junr03/subscriptions","organizations_url":"https://api.github.com/users/junr03/orgs","repos_url":"https://api.github.com/users/junr03/repos","events_url":"https://api.github.com/users/junr03/events{/privacy}","received_events_url":"https://api.github.com/users/junr03/received_events","type":"User","site_admin":false},{"login":"mattklein123","id":6305260,"node_id":"MDQ6VXNlcjYzMDUyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6305260?v=4","gravatar_id":"","url":"https://api.github.com/users/mattklein123","html_url":"https://github.com/mattklein123","followers_url":"https://api.github.com/users/mattklein123/followers","following_url":"https://api.github.com/users/mattklein123/following{/other_user}","gists_url":"https://api.github.com/users/mattklein123/gists{/gist_id}","starred_url":"https://api.github.com/users/mattklein123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattklein123/subscriptions","organizations_url":"https://api.github.com/users/mattklein123/orgs","repos_url":"https://api.github.com/users/mattklein123/repos","events_url":"https://api.github.com/users/mattklein123/events{/privacy}","received_events_url":"https://api.github.com/users/mattklein123/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861/commits","review_comments_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861/comments","review_comment_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/issues/5861/comments","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/cf5dad6c3047f945ec8ae2f49a9f76fd6b9dceca","head":{"label":"klarose:restrict_conn_pools","ref":"restrict_conn_pools","sha":"cf5dad6c3047f945ec8ae2f49a9f76fd6b9dceca","user":{"login":"klarose","id":23175939,"node_id":"MDQ6VXNlcjIzMTc1OTM5","avatar_url":"https://avatars1.githubusercontent.com/u/23175939?v=4","gravatar_id":"","url":"https://api.github.com/users/klarose","html_url":"https://github.com/klarose","followers_url":"https://api.github.com/users/klarose/followers","following_url":"https://api.github.com/users/klarose/following{/other_user}","gists_url":"https://api.github.com/users/klarose/gists{/gist_id}","starred_url":"https://api.github.com/users/klarose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarose/subscriptions","organizations_url":"https://api.github.com/users/klarose/orgs","repos_url":"https://api.github.com/users/klarose/repos","events_url":"https://api.github.com/users/klarose/events{/privacy}","received_events_url":"https://api.github.com/users/klarose/received_events","type":"User","site_admin":false},"repo":{"id":157557258,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc1NTcyNTg=","name":"envoy","full_name":"klarose/envoy","private":false,"owner":{"login":"klarose","id":23175939,"node_id":"MDQ6VXNlcjIzMTc1OTM5","avatar_url":"https://avatars1.githubusercontent.com/u/23175939?v=4","gravatar_id":"","url":"https://api.github.com/users/klarose","html_url":"https://github.com/klarose","followers_url":"https://api.github.com/users/klarose/followers","following_url":"https://api.github.com/users/klarose/following{/other_user}","gists_url":"https://api.github.com/users/klarose/gists{/gist_id}","starred_url":"https://api.github.com/users/klarose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarose/subscriptions","organizations_url":"https://api.github.com/users/klarose/orgs","repos_url":"https://api.github.com/users/klarose/repos","events_url":"https://api.github.com/users/klarose/events{/privacy}","received_events_url":"https://api.github.com/users/klarose/received_events","type":"User","site_admin":false},"html_url":"https://github.com/klarose/envoy","description":"C++ front/service proxy","fork":true,"url":"https://api.github.com/repos/klarose/envoy","forks_url":"https://api.github.com/repos/klarose/envoy/forks","keys_url":"https://api.github.com/repos/klarose/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klarose/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klarose/envoy/teams","hooks_url":"https://api.github.com/repos/klarose/envoy/hooks","issue_events_url":"https://api.github.com/repos/klarose/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/klarose/envoy/events","assignees_url":"https://api.github.com/repos/klarose/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/klarose/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/klarose/envoy/tags","blobs_url":"https://api.github.com/repos/klarose/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klarose/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klarose/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/klarose/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klarose/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/klarose/envoy/languages","stargazers_url":"https://api.github.com/repos/klarose/envoy/stargazers","contributors_url":"https://api.github.com/repos/klarose/envoy/contributors","subscribers_url":"https://api.github.com/repos/klarose/envoy/subscribers","subscription_url":"https://api.github.com/repos/klarose/envoy/subscription","commits_url":"https://api.github.com/repos/klarose/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/klarose/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/klarose/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/klarose/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/klarose/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/klarose/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klarose/envoy/merges","archive_url":"https://api.github.com/repos/klarose/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klarose/envoy/downloads","issues_url":"https://api.github.com/repos/klarose/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/klarose/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/klarose/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/klarose/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klarose/envoy/labels{/name}","releases_url":"https://api.github.com/repos/klarose/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/klarose/envoy/deployments","created_at":"2018-11-14T14:01:51Z","updated_at":"2018-11-14T14:02:00Z","pushed_at":"2019-02-06T16:46:00Z","git_url":"git://github.com/klarose/envoy.git","ssh_url":"git@github.com:klarose/envoy.git","clone_url":"https://github.com/klarose/envoy.git","svn_url":"https://github.com/klarose/envoy","homepage":"https://www.envoyproxy.io","size":29122,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"envoyproxy:master","ref":"master","sha":"13a3bbc9359eda8b5201864fd2f09d9fe8924a9d","user":{"login":"envoyproxy","id":30125649,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI1NjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/30125649?v=4","gravatar_id":"","url":"https://api.github.com/users/envoyproxy","html_url":"https://github.com/envoyproxy","followers_url":"https://api.github.com/users/envoyproxy/followers","following_url":"https://api.github.com/users/envoyproxy/following{/other_user}","gists_url":"https://api.github.com/users/envoyproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/envoyproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envoyproxy/subscriptions","organizations_url":"https://api.github.com/users/envoyproxy/orgs","repos_url":"https://api.github.com/users/envoyproxy/repos","events_url":"https://api.github.com/users/envoyproxy/events{/privacy}","received_events_url":"https://api.github.com/users/envoyproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":65214191,"node_id":"MDEwOlJlcG9zaXRvcnk2NTIxNDE5MQ==","name":"envoy","full_name":"envoyproxy/envoy","private":false,"owner":{"login":"envoyproxy","id":30125649,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI1NjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/30125649?v=4","gravatar_id":"","url":"https://api.github.com/users/envoyproxy","html_url":"https://github.com/envoyproxy","followers_url":"https://api.github.com/users/envoyproxy/followers","following_url":"https://api.github.com/users/envoyproxy/following{/other_user}","gists_url":"https://api.github.com/users/envoyproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/envoyproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envoyproxy/subscriptions","organizations_url":"https://api.github.com/users/envoyproxy/orgs","repos_url":"https://api.github.com/users/envoyproxy/repos","events_url":"https://api.github.com/users/envoyproxy/events{/privacy}","received_events_url":"https://api.github.com/users/envoyproxy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/envoyproxy/envoy","description":"Cloud-native high-performance edge/middle/service proxy","fork":false,"url":"https://api.github.com/repos/envoyproxy/envoy","forks_url":"https://api.github.com/repos/envoyproxy/envoy/forks","keys_url":"https://api.github.com/repos/envoyproxy/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envoyproxy/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envoyproxy/envoy/teams","hooks_url":"https://api.github.com/repos/envoyproxy/envoy/hooks","issue_events_url":"https://api.github.com/repos/envoyproxy/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/envoyproxy/envoy/events","assignees_url":"https://api.github.com/repos/envoyproxy/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/envoyproxy/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/envoyproxy/envoy/tags","blobs_url":"https://api.github.com/repos/envoyproxy/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envoyproxy/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envoyproxy/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/envoyproxy/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/envoyproxy/envoy/languages","stargazers_url":"https://api.github.com/repos/envoyproxy/envoy/stargazers","contributors_url":"https://api.github.com/repos/envoyproxy/envoy/contributors","subscribers_url":"https://api.github.com/repos/envoyproxy/envoy/subscribers","subscription_url":"https://api.github.com/repos/envoyproxy/envoy/subscription","commits_url":"https://api.github.com/repos/envoyproxy/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/envoyproxy/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/envoyproxy/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/envoyproxy/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/envoyproxy/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envoyproxy/envoy/merges","archive_url":"https://api.github.com/repos/envoyproxy/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envoyproxy/envoy/downloads","issues_url":"https://api.github.com/repos/envoyproxy/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/envoyproxy/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/envoyproxy/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/envoyproxy/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envoyproxy/envoy/labels{/name}","releases_url":"https://api.github.com/repos/envoyproxy/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/envoyproxy/envoy/deployments","created_at":"2016-08-08T15:07:24Z","updated_at":"2019-02-11T19:28:09Z","pushed_at":"2019-02-11T20:26:01Z","git_url":"git://github.com/envoyproxy/envoy.git","ssh_url":"git@github.com:envoyproxy/envoy.git","clone_url":"https://github.com/envoyproxy/envoy.git","svn_url":"https://github.com/envoyproxy/envoy","homepage":"https://www.envoyproxy.io","size":28962,"stargazers_count":8314,"watchers_count":8314,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1215,"mirror_url":null,"archived":false,"open_issues_count":466,"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":1215,"open_issues":466,"watchers":8314,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/5861"},"issue":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/5861"},"comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/5861/comments"},"review_comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861/comments"},"review_comment":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/5861/commits"},"statuses":{"href":"https://api.github.com/repos/envoyproxy/envoy/statuses/cf5dad6c3047f945ec8ae2f49a9f76fd6b9dceca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mattklein123"}}