{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/presto/pulls/comments/34524568","id":34524568,"diff_hunk":"@@ -30,10 +31,13 @@\n {\n     public static final MemoryPoolId GENERAL_POOL = new MemoryPoolId(\"general\");\n     public static final MemoryPoolId RESERVED_POOL = new MemoryPoolId(\"reserved\");\n+    public static final MemoryPoolId SYSTEM_POOL = new MemoryPoolId(\"system\");\n \n     private final DataSize maxMemory;\n     private final Map<MemoryPoolId, MemoryPool> pools;\n \n+    private final AtomicLong currentSystemMemory = new AtomicLong();","path":"presto-main/src/main/java/com/facebook/presto/memory/LocalMemoryManager.java","position":17,"original_position":17,"commit_id":"53595e869b9ecb56a7dd02e0498fc368134906f4","original_commit_id":"53595e869b9ecb56a7dd02e0498fc368134906f4","user":{"login":"cberner","id":842688,"avatar_url":"https://avatars.githubusercontent.com/u/842688?v=3","gravatar_id":"","url":"https://api.github.com/users/cberner","html_url":"https://github.com/cberner","followers_url":"https://api.github.com/users/cberner/followers","following_url":"https://api.github.com/users/cberner/following{/other_user}","gists_url":"https://api.github.com/users/cberner/gists{/gist_id}","starred_url":"https://api.github.com/users/cberner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cberner/subscriptions","organizations_url":"https://api.github.com/users/cberner/orgs","repos_url":"https://api.github.com/users/cberner/repos","events_url":"https://api.github.com/users/cberner/events{/privacy}","received_events_url":"https://api.github.com/users/cberner/received_events","type":"User","site_admin":false},"body":"you can remove this. The MemoryPool already has the number of free bytes","created_at":"2015-07-13T23:40:59Z","updated_at":"2015-07-13T23:40:59Z","html_url":"https://github.com/facebook/presto/pull/3243#discussion_r34524568","pull_request_url":"https://api.github.com/repos/facebook/presto/pulls/3243","_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments/34524568"},"html":{"href":"https://github.com/facebook/presto/pull/3243#discussion_r34524568"},"pull_request":{"href":"https://api.github.com/repos/facebook/presto/pulls/3243"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/presto/pulls/3243","id":39637730,"html_url":"https://github.com/facebook/presto/pull/3243","diff_url":"https://github.com/facebook/presto/pull/3243.diff","patch_url":"https://github.com/facebook/presto/pull/3243.patch","issue_url":"https://api.github.com/repos/facebook/presto/issues/3243","number":3243,"state":"open","locked":false,"title":"Shared buffer system memory tracking","user":{"login":"jacobgao","id":2807120,"avatar_url":"https://avatars.githubusercontent.com/u/2807120?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobgao","html_url":"https://github.com/jacobgao","followers_url":"https://api.github.com/users/jacobgao/followers","following_url":"https://api.github.com/users/jacobgao/following{/other_user}","gists_url":"https://api.github.com/users/jacobgao/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobgao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobgao/subscriptions","organizations_url":"https://api.github.com/users/jacobgao/orgs","repos_url":"https://api.github.com/users/jacobgao/repos","events_url":"https://api.github.com/users/jacobgao/events{/privacy}","received_events_url":"https://api.github.com/users/jacobgao/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-09T23:03:46Z","updated_at":"2015-07-13T23:40:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"341e0226c8aa66710048300d3ee9f3236cfc4fd3","assignee":{"login":"cberner","id":842688,"avatar_url":"https://avatars.githubusercontent.com/u/842688?v=3","gravatar_id":"","url":"https://api.github.com/users/cberner","html_url":"https://github.com/cberner","followers_url":"https://api.github.com/users/cberner/followers","following_url":"https://api.github.com/users/cberner/following{/other_user}","gists_url":"https://api.github.com/users/cberner/gists{/gist_id}","starred_url":"https://api.github.com/users/cberner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cberner/subscriptions","organizations_url":"https://api.github.com/users/cberner/orgs","repos_url":"https://api.github.com/users/cberner/repos","events_url":"https://api.github.com/users/cberner/events{/privacy}","received_events_url":"https://api.github.com/users/cberner/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/facebook/presto/pulls/3243/commits","review_comments_url":"https://api.github.com/repos/facebook/presto/pulls/3243/comments","review_comment_url":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/presto/issues/3243/comments","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/53595e869b9ecb56a7dd02e0498fc368134906f4","head":{"label":"jacobgao:systempool","ref":"systempool","sha":"53595e869b9ecb56a7dd02e0498fc368134906f4","user":{"login":"jacobgao","id":2807120,"avatar_url":"https://avatars.githubusercontent.com/u/2807120?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobgao","html_url":"https://github.com/jacobgao","followers_url":"https://api.github.com/users/jacobgao/followers","following_url":"https://api.github.com/users/jacobgao/following{/other_user}","gists_url":"https://api.github.com/users/jacobgao/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobgao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobgao/subscriptions","organizations_url":"https://api.github.com/users/jacobgao/orgs","repos_url":"https://api.github.com/users/jacobgao/repos","events_url":"https://api.github.com/users/jacobgao/events{/privacy}","received_events_url":"https://api.github.com/users/jacobgao/received_events","type":"User","site_admin":false},"repo":{"id":36752016,"name":"presto","full_name":"jacobgao/presto","owner":{"login":"jacobgao","id":2807120,"avatar_url":"https://avatars.githubusercontent.com/u/2807120?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobgao","html_url":"https://github.com/jacobgao","followers_url":"https://api.github.com/users/jacobgao/followers","following_url":"https://api.github.com/users/jacobgao/following{/other_user}","gists_url":"https://api.github.com/users/jacobgao/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobgao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobgao/subscriptions","organizations_url":"https://api.github.com/users/jacobgao/orgs","repos_url":"https://api.github.com/users/jacobgao/repos","events_url":"https://api.github.com/users/jacobgao/events{/privacy}","received_events_url":"https://api.github.com/users/jacobgao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacobgao/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":true,"url":"https://api.github.com/repos/jacobgao/presto","forks_url":"https://api.github.com/repos/jacobgao/presto/forks","keys_url":"https://api.github.com/repos/jacobgao/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacobgao/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacobgao/presto/teams","hooks_url":"https://api.github.com/repos/jacobgao/presto/hooks","issue_events_url":"https://api.github.com/repos/jacobgao/presto/issues/events{/number}","events_url":"https://api.github.com/repos/jacobgao/presto/events","assignees_url":"https://api.github.com/repos/jacobgao/presto/assignees{/user}","branches_url":"https://api.github.com/repos/jacobgao/presto/branches{/branch}","tags_url":"https://api.github.com/repos/jacobgao/presto/tags","blobs_url":"https://api.github.com/repos/jacobgao/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacobgao/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacobgao/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacobgao/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacobgao/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/jacobgao/presto/languages","stargazers_url":"https://api.github.com/repos/jacobgao/presto/stargazers","contributors_url":"https://api.github.com/repos/jacobgao/presto/contributors","subscribers_url":"https://api.github.com/repos/jacobgao/presto/subscribers","subscription_url":"https://api.github.com/repos/jacobgao/presto/subscription","commits_url":"https://api.github.com/repos/jacobgao/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacobgao/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacobgao/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacobgao/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacobgao/presto/contents/{+path}","compare_url":"https://api.github.com/repos/jacobgao/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacobgao/presto/merges","archive_url":"https://api.github.com/repos/jacobgao/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacobgao/presto/downloads","issues_url":"https://api.github.com/repos/jacobgao/presto/issues{/number}","pulls_url":"https://api.github.com/repos/jacobgao/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/jacobgao/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/jacobgao/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacobgao/presto/labels{/name}","releases_url":"https://api.github.com/repos/jacobgao/presto/releases{/id}","created_at":"2015-06-02T18:07:04Z","updated_at":"2015-06-02T18:07:13Z","pushed_at":"2015-07-13T18:54:55Z","git_url":"git://github.com/jacobgao/presto.git","ssh_url":"git@github.com:jacobgao/presto.git","clone_url":"https://github.com/jacobgao/presto.git","svn_url":"https://github.com/jacobgao/presto","homepage":"https://prestodb.io","size":43093,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"c92190e9ed29096ffea048a60f12233d3af8c05b","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"facebook/presto","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":false,"url":"https://api.github.com/repos/facebook/presto","forks_url":"https://api.github.com/repos/facebook/presto/forks","keys_url":"https://api.github.com/repos/facebook/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/presto/teams","hooks_url":"https://api.github.com/repos/facebook/presto/hooks","issue_events_url":"https://api.github.com/repos/facebook/presto/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/presto/events","assignees_url":"https://api.github.com/repos/facebook/presto/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/presto/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/presto/tags","blobs_url":"https://api.github.com/repos/facebook/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/presto/languages","stargazers_url":"https://api.github.com/repos/facebook/presto/stargazers","contributors_url":"https://api.github.com/repos/facebook/presto/contributors","subscribers_url":"https://api.github.com/repos/facebook/presto/subscribers","subscription_url":"https://api.github.com/repos/facebook/presto/subscription","commits_url":"https://api.github.com/repos/facebook/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/presto/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/presto/merges","archive_url":"https://api.github.com/repos/facebook/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/presto/downloads","issues_url":"https://api.github.com/repos/facebook/presto/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/presto/labels{/name}","releases_url":"https://api.github.com/repos/facebook/presto/releases{/id}","created_at":"2012-08-09T01:03:37Z","updated_at":"2015-07-13T17:46:45Z","pushed_at":"2015-07-13T22:59:43Z","git_url":"git://github.com/facebook/presto.git","ssh_url":"git@github.com:facebook/presto.git","clone_url":"https://github.com/facebook/presto.git","svn_url":"https://github.com/facebook/presto","homepage":"https://prestodb.io","size":94226,"stargazers_count":3626,"watchers_count":3626,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":901,"mirror_url":null,"open_issues_count":302,"forks":901,"open_issues":302,"watchers":3626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/3243"},"html":{"href":"https://github.com/facebook/presto/pull/3243"},"issue":{"href":"https://api.github.com/repos/facebook/presto/issues/3243"},"comments":{"href":"https://api.github.com/repos/facebook/presto/issues/3243/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/presto/pulls/3243/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/presto/pulls/3243/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/presto/statuses/53595e869b9ecb56a7dd02e0498fc368134906f4"}}}}