{"action":"created","comment":{"url":"https://api.github.com/repos/PowerDNS/pdns/pulls/comments/179535110","pull_request_review_id":109798053,"id":179535110,"diff_hunk":"@@ -109,6 +113,7 @@ NSECRecordContent::DNSRecordContent* NSECRecordContent::make(const DNSRecord &dr\n       for(int bit = 0; bit < 8 ; ++bit , val>>=1)\n         if(val & 1) {\n           ret->d_set.insert((7-bit) + 8*(k) + 256*window);\n+          ret->d_size_in_bytes += 2 + 2*sizeof(void*);","path":"pdns/nsecrecords.cc","position":16,"original_position":16,"commit_id":"c002bfa907b3b95ef12d7c4658f63747dc00f853","original_commit_id":"e9e035787de7aa305905c452e1114cbad6dd758f","user":{"login":"Habbie","id":525838,"avatar_url":"https://avatars1.githubusercontent.com/u/525838?v=4","gravatar_id":"","url":"https://api.github.com/users/Habbie","html_url":"https://github.com/Habbie","followers_url":"https://api.github.com/users/Habbie/followers","following_url":"https://api.github.com/users/Habbie/following{/other_user}","gists_url":"https://api.github.com/users/Habbie/gists{/gist_id}","starred_url":"https://api.github.com/users/Habbie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Habbie/subscriptions","organizations_url":"https://api.github.com/users/Habbie/orgs","repos_url":"https://api.github.com/users/Habbie/repos","events_url":"https://api.github.com/users/Habbie/events{/privacy}","received_events_url":"https://api.github.com/users/Habbie/received_events","type":"User","site_admin":false},"body":"> Shouldn't we have the same thing for NSEC3 records too?\r\n\r\nTyped it in but forgot to commit&push; now pushed. The code duplication bothers me there btw.","created_at":"2018-04-05T17:10:09Z","updated_at":"2018-04-05T17:10:09Z","html_url":"https://github.com/PowerDNS/pdns/pull/6447#discussion_r179535110","pull_request_url":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/PowerDNS/pdns/pulls/comments/179535110"},"html":{"href":"https://github.com/PowerDNS/pdns/pull/6447#discussion_r179535110"},"pull_request":{"href":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447"}},"in_reply_to_id":179379877},"pull_request":{"url":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447","id":179507067,"html_url":"https://github.com/PowerDNS/pdns/pull/6447","diff_url":"https://github.com/PowerDNS/pdns/pull/6447.diff","patch_url":"https://github.com/PowerDNS/pdns/pull/6447.patch","issue_url":"https://api.github.com/repos/PowerDNS/pdns/issues/6447","number":6447,"state":"open","locked":false,"title":"[WIP] add memory limits to recursor caches","user":{"login":"Habbie","id":525838,"avatar_url":"https://avatars1.githubusercontent.com/u/525838?v=4","gravatar_id":"","url":"https://api.github.com/users/Habbie","html_url":"https://github.com/Habbie","followers_url":"https://api.github.com/users/Habbie/followers","following_url":"https://api.github.com/users/Habbie/following{/other_user}","gists_url":"https://api.github.com/users/Habbie/gists{/gist_id}","starred_url":"https://api.github.com/users/Habbie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Habbie/subscriptions","organizations_url":"https://api.github.com/users/Habbie/orgs","repos_url":"https://api.github.com/users/Habbie/repos","events_url":"https://api.github.com/users/Habbie/events{/privacy}","received_events_url":"https://api.github.com/users/Habbie/received_events","type":"User","site_admin":false},"body":"### Short description\r\nThis adds -bytes limits to the three recursor caches, in addition to the existing -entries limits. Cache pruning has been extended to make sure caches stay below both limits. 'bytes' reporting has been reinstated in `rec-control get_all` as that has become cheap.\r\n\r\nTODO:\r\n- [ ] make sure all xfr* methods, and all specific implementations of type conversion (like I did for NSEC/NSEC3) account for their usage\r\n- [ ] measure against actual memory usage, then adjust the fudge factors (easily recognised by their use of `sizeof`); for this, it would be nice if we actually had a 'real memory usage' metric\r\n- [ ] document\r\n- [ ] make tests pass again\r\n- [ ] expose `max-negcache-[bytes|entries]` metrics\r\n\r\n### Checklist\r\n<!-- please indicate if any of these things are done/included with this Pull Request. Not all boxes need to be checked for the Pull Request to be accepted -->\r\nI have:\r\n- [x] read the [CONTRIBUTING.md](https://github.com/PowerDNS/pdns/blob/master/CONTRIBUTING.md) document\r\n- [ ] compiled and tested this code\r\n- [ ] included documentation (including possible behaviour changes)\r\n- [ ] documented the code\r\n- [ ] added or modified regression test(s)\r\n- [ ] added or modified unit test(s)\r\n- [ ] <!-- remove this line if your PR is against master --> checked that this code was merged to master\r\n","created_at":"2018-04-04T20:43:15Z","updated_at":"2018-04-05T17:10:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef92cd167f9d226ff0c8e58b20703c20c593d7b2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":37446008,"url":"https://api.github.com/repos/PowerDNS/pdns/labels/enhancement","name":"enhancement","color":"cccccc","default":true},{"id":37445984,"url":"https://api.github.com/repos/PowerDNS/pdns/labels/rec","name":"rec","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447/commits","review_comments_url":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447/comments","review_comment_url":"https://api.github.com/repos/PowerDNS/pdns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PowerDNS/pdns/issues/6447/comments","statuses_url":"https://api.github.com/repos/PowerDNS/pdns/statuses/c002bfa907b3b95ef12d7c4658f63747dc00f853","head":{"label":"Habbie:cache-count-bytes","ref":"cache-count-bytes","sha":"c002bfa907b3b95ef12d7c4658f63747dc00f853","user":{"login":"Habbie","id":525838,"avatar_url":"https://avatars1.githubusercontent.com/u/525838?v=4","gravatar_id":"","url":"https://api.github.com/users/Habbie","html_url":"https://github.com/Habbie","followers_url":"https://api.github.com/users/Habbie/followers","following_url":"https://api.github.com/users/Habbie/following{/other_user}","gists_url":"https://api.github.com/users/Habbie/gists{/gist_id}","starred_url":"https://api.github.com/users/Habbie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Habbie/subscriptions","organizations_url":"https://api.github.com/users/Habbie/orgs","repos_url":"https://api.github.com/users/Habbie/repos","events_url":"https://api.github.com/users/Habbie/events{/privacy}","received_events_url":"https://api.github.com/users/Habbie/received_events","type":"User","site_admin":false},"repo":{"id":14397693,"name":"pdns","full_name":"Habbie/pdns","owner":{"login":"Habbie","id":525838,"avatar_url":"https://avatars1.githubusercontent.com/u/525838?v=4","gravatar_id":"","url":"https://api.github.com/users/Habbie","html_url":"https://github.com/Habbie","followers_url":"https://api.github.com/users/Habbie/followers","following_url":"https://api.github.com/users/Habbie/following{/other_user}","gists_url":"https://api.github.com/users/Habbie/gists{/gist_id}","starred_url":"https://api.github.com/users/Habbie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Habbie/subscriptions","organizations_url":"https://api.github.com/users/Habbie/orgs","repos_url":"https://api.github.com/users/Habbie/repos","events_url":"https://api.github.com/users/Habbie/events{/privacy}","received_events_url":"https://api.github.com/users/Habbie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Habbie/pdns","description":"PowerDNS","fork":true,"url":"https://api.github.com/repos/Habbie/pdns","forks_url":"https://api.github.com/repos/Habbie/pdns/forks","keys_url":"https://api.github.com/repos/Habbie/pdns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Habbie/pdns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Habbie/pdns/teams","hooks_url":"https://api.github.com/repos/Habbie/pdns/hooks","issue_events_url":"https://api.github.com/repos/Habbie/pdns/issues/events{/number}","events_url":"https://api.github.com/repos/Habbie/pdns/events","assignees_url":"https://api.github.com/repos/Habbie/pdns/assignees{/user}","branches_url":"https://api.github.com/repos/Habbie/pdns/branches{/branch}","tags_url":"https://api.github.com/repos/Habbie/pdns/tags","blobs_url":"https://api.github.com/repos/Habbie/pdns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Habbie/pdns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Habbie/pdns/git/refs{/sha}","trees_url":"https://api.github.com/repos/Habbie/pdns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Habbie/pdns/statuses/{sha}","languages_url":"https://api.github.com/repos/Habbie/pdns/languages","stargazers_url":"https://api.github.com/repos/Habbie/pdns/stargazers","contributors_url":"https://api.github.com/repos/Habbie/pdns/contributors","subscribers_url":"https://api.github.com/repos/Habbie/pdns/subscribers","subscription_url":"https://api.github.com/repos/Habbie/pdns/subscription","commits_url":"https://api.github.com/repos/Habbie/pdns/commits{/sha}","git_commits_url":"https://api.github.com/repos/Habbie/pdns/git/commits{/sha}","comments_url":"https://api.github.com/repos/Habbie/pdns/comments{/number}","issue_comment_url":"https://api.github.com/repos/Habbie/pdns/issues/comments{/number}","contents_url":"https://api.github.com/repos/Habbie/pdns/contents/{+path}","compare_url":"https://api.github.com/repos/Habbie/pdns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Habbie/pdns/merges","archive_url":"https://api.github.com/repos/Habbie/pdns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Habbie/pdns/downloads","issues_url":"https://api.github.com/repos/Habbie/pdns/issues{/number}","pulls_url":"https://api.github.com/repos/Habbie/pdns/pulls{/number}","milestones_url":"https://api.github.com/repos/Habbie/pdns/milestones{/number}","notifications_url":"https://api.github.com/repos/Habbie/pdns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Habbie/pdns/labels{/name}","releases_url":"https://api.github.com/repos/Habbie/pdns/releases{/id}","deployments_url":"https://api.github.com/repos/Habbie/pdns/deployments","created_at":"2013-11-14T14:45:08Z","updated_at":"2018-03-29T17:42:31Z","pushed_at":"2018-04-05T14:35:35Z","git_url":"git://github.com/Habbie/pdns.git","ssh_url":"git@github.com:Habbie/pdns.git","clone_url":"https://github.com/Habbie/pdns.git","svn_url":"https://github.com/Habbie/pdns","homepage":null,"size":42920,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PowerDNS:master","ref":"master","sha":"db776303233d23f78304d57389d4882d12b3e90e","user":{"login":"PowerDNS","id":1282630,"avatar_url":"https://avatars3.githubusercontent.com/u/1282630?v=4","gravatar_id":"","url":"https://api.github.com/users/PowerDNS","html_url":"https://github.com/PowerDNS","followers_url":"https://api.github.com/users/PowerDNS/followers","following_url":"https://api.github.com/users/PowerDNS/following{/other_user}","gists_url":"https://api.github.com/users/PowerDNS/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerDNS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerDNS/subscriptions","organizations_url":"https://api.github.com/users/PowerDNS/orgs","repos_url":"https://api.github.com/users/PowerDNS/repos","events_url":"https://api.github.com/users/PowerDNS/events{/privacy}","received_events_url":"https://api.github.com/users/PowerDNS/received_events","type":"Organization","site_admin":false},"repo":{"id":9693534,"name":"pdns","full_name":"PowerDNS/pdns","owner":{"login":"PowerDNS","id":1282630,"avatar_url":"https://avatars3.githubusercontent.com/u/1282630?v=4","gravatar_id":"","url":"https://api.github.com/users/PowerDNS","html_url":"https://github.com/PowerDNS","followers_url":"https://api.github.com/users/PowerDNS/followers","following_url":"https://api.github.com/users/PowerDNS/following{/other_user}","gists_url":"https://api.github.com/users/PowerDNS/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerDNS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerDNS/subscriptions","organizations_url":"https://api.github.com/users/PowerDNS/orgs","repos_url":"https://api.github.com/users/PowerDNS/repos","events_url":"https://api.github.com/users/PowerDNS/events{/privacy}","received_events_url":"https://api.github.com/users/PowerDNS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PowerDNS/pdns","description":"PowerDNS","fork":false,"url":"https://api.github.com/repos/PowerDNS/pdns","forks_url":"https://api.github.com/repos/PowerDNS/pdns/forks","keys_url":"https://api.github.com/repos/PowerDNS/pdns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PowerDNS/pdns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PowerDNS/pdns/teams","hooks_url":"https://api.github.com/repos/PowerDNS/pdns/hooks","issue_events_url":"https://api.github.com/repos/PowerDNS/pdns/issues/events{/number}","events_url":"https://api.github.com/repos/PowerDNS/pdns/events","assignees_url":"https://api.github.com/repos/PowerDNS/pdns/assignees{/user}","branches_url":"https://api.github.com/repos/PowerDNS/pdns/branches{/branch}","tags_url":"https://api.github.com/repos/PowerDNS/pdns/tags","blobs_url":"https://api.github.com/repos/PowerDNS/pdns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PowerDNS/pdns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PowerDNS/pdns/git/refs{/sha}","trees_url":"https://api.github.com/repos/PowerDNS/pdns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PowerDNS/pdns/statuses/{sha}","languages_url":"https://api.github.com/repos/PowerDNS/pdns/languages","stargazers_url":"https://api.github.com/repos/PowerDNS/pdns/stargazers","contributors_url":"https://api.github.com/repos/PowerDNS/pdns/contributors","subscribers_url":"https://api.github.com/repos/PowerDNS/pdns/subscribers","subscription_url":"https://api.github.com/repos/PowerDNS/pdns/subscription","commits_url":"https://api.github.com/repos/PowerDNS/pdns/commits{/sha}","git_commits_url":"https://api.github.com/repos/PowerDNS/pdns/git/commits{/sha}","comments_url":"https://api.github.com/repos/PowerDNS/pdns/comments{/number}","issue_comment_url":"https://api.github.com/repos/PowerDNS/pdns/issues/comments{/number}","contents_url":"https://api.github.com/repos/PowerDNS/pdns/contents/{+path}","compare_url":"https://api.github.com/repos/PowerDNS/pdns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PowerDNS/pdns/merges","archive_url":"https://api.github.com/repos/PowerDNS/pdns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PowerDNS/pdns/downloads","issues_url":"https://api.github.com/repos/PowerDNS/pdns/issues{/number}","pulls_url":"https://api.github.com/repos/PowerDNS/pdns/pulls{/number}","milestones_url":"https://api.github.com/repos/PowerDNS/pdns/milestones{/number}","notifications_url":"https://api.github.com/repos/PowerDNS/pdns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PowerDNS/pdns/labels{/name}","releases_url":"https://api.github.com/repos/PowerDNS/pdns/releases{/id}","deployments_url":"https://api.github.com/repos/PowerDNS/pdns/deployments","created_at":"2013-04-26T11:16:49Z","updated_at":"2018-04-05T13:31:06Z","pushed_at":"2018-04-05T14:36:05Z","git_url":"git://github.com/PowerDNS/pdns.git","ssh_url":"git@github.com:PowerDNS/pdns.git","clone_url":"https://github.com/PowerDNS/pdns.git","svn_url":"https://github.com/PowerDNS/pdns","homepage":null,"size":42163,"stargazers_count":1189,"watchers_count":1189,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":409,"mirror_url":null,"archived":false,"open_issues_count":586,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":409,"open_issues":586,"watchers":1189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447"},"html":{"href":"https://github.com/PowerDNS/pdns/pull/6447"},"issue":{"href":"https://api.github.com/repos/PowerDNS/pdns/issues/6447"},"comments":{"href":"https://api.github.com/repos/PowerDNS/pdns/issues/6447/comments"},"review_comments":{"href":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447/comments"},"review_comment":{"href":"https://api.github.com/repos/PowerDNS/pdns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PowerDNS/pdns/pulls/6447/commits"},"statuses":{"href":"https://api.github.com/repos/PowerDNS/pdns/statuses/c002bfa907b3b95ef12d7c4658f63747dc00f853"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Habbie"}}