{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/tsdb/pulls/comments/198816292","pull_request_review_id":132812223,"id":198816292,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODgxNjI5Mg==","diff_hunk":"@@ -57,6 +58,9 @@ type Options struct {\n \t// Duration of persisted data to keep.\n \tRetentionDuration uint64\n \n+\t// Maximum number of bytes to be retained.","path":"db.go","position":12,"original_position":12,"commit_id":"521f642e53695dcc3964805d874c91c17709d3de","original_commit_id":"521f642e53695dcc3964805d874c91c17709d3de","user":{"login":"brian-brazil","id":7115638,"node_id":"MDQ6VXNlcjcxMTU2Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/7115638?v=4","gravatar_id":"","url":"https://api.github.com/users/brian-brazil","html_url":"https://github.com/brian-brazil","followers_url":"https://api.github.com/users/brian-brazil/followers","following_url":"https://api.github.com/users/brian-brazil/following{/other_user}","gists_url":"https://api.github.com/users/brian-brazil/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-brazil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-brazil/subscriptions","organizations_url":"https://api.github.com/users/brian-brazil/orgs","repos_url":"https://api.github.com/users/brian-brazil/repos","events_url":"https://api.github.com/users/brian-brazil/events{/privacy}","received_events_url":"https://api.github.com/users/brian-brazil/received_events","type":"User","site_admin":false},"body":"bytes in blocks","created_at":"2018-06-28T12:09:03Z","updated_at":"2018-06-28T12:15:38Z","html_url":"https://github.com/prometheus/tsdb/pull/343#discussion_r198816292","pull_request_url":"https://api.github.com/repos/prometheus/tsdb/pulls/343","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/comments/198816292"},"html":{"href":"https://github.com/prometheus/tsdb/pull/343#discussion_r198816292"},"pull_request":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/343"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/tsdb/pulls/343","id":193096177,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMDk2MTc3","html_url":"https://github.com/prometheus/tsdb/pull/343","diff_url":"https://github.com/prometheus/tsdb/pull/343.diff","patch_url":"https://github.com/prometheus/tsdb/pull/343.patch","issue_url":"https://api.github.com/repos/prometheus/tsdb/issues/343","number":343,"state":"open","locked":false,"title":"Added storage size based retention method and new metrics","user":{"login":"mknapphrt","id":39998367,"node_id":"MDQ6VXNlcjM5OTk4MzY3","avatar_url":"https://avatars1.githubusercontent.com/u/39998367?v=4","gravatar_id":"","url":"https://api.github.com/users/mknapphrt","html_url":"https://github.com/mknapphrt","followers_url":"https://api.github.com/users/mknapphrt/followers","following_url":"https://api.github.com/users/mknapphrt/following{/other_user}","gists_url":"https://api.github.com/users/mknapphrt/gists{/gist_id}","starred_url":"https://api.github.com/users/mknapphrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mknapphrt/subscriptions","organizations_url":"https://api.github.com/users/mknapphrt/orgs","repos_url":"https://api.github.com/users/mknapphrt/repos","events_url":"https://api.github.com/users/mknapphrt/events{/privacy}","received_events_url":"https://api.github.com/users/mknapphrt/received_events","type":"User","site_admin":false},"body":"Added methods needed to retain data based on a byte limitation rather than time. Limitation is only applied if the flag is set (defaults to 0). Both blocks that are older than the retention period and the blocks that make the size of the storage too large are removed.\r\n\r\n2 new metrics for keeping track of the size of the local storage folder and the amount of times data has been deleted because the size restriction was exceeded.\r\n\r\nThis PR is in conjunction with a PR with prometheus/prometheus. The idea is to allow a user to set a maximum number of bytes that the local storage can take up, in conjunction with the retention period, and whenever that limit is exceeded the oldest block will be deleted to regain space.\r\n\r\n\r\nSigned-off-by: Mark Knapp <mknapp@hudson-trading.com>","created_at":"2018-06-06T18:08:25Z","updated_at":"2018-06-28T12:15:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64f385539e1f78c0c5543f576e52c321772aa568","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/tsdb/pulls/343/commits","review_comments_url":"https://api.github.com/repos/prometheus/tsdb/pulls/343/comments","review_comment_url":"https://api.github.com/repos/prometheus/tsdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/tsdb/issues/343/comments","statuses_url":"https://api.github.com/repos/prometheus/tsdb/statuses/521f642e53695dcc3964805d874c91c17709d3de","head":{"label":"mknapphrt:size_based_retention","ref":"size_based_retention","sha":"521f642e53695dcc3964805d874c91c17709d3de","user":{"login":"mknapphrt","id":39998367,"node_id":"MDQ6VXNlcjM5OTk4MzY3","avatar_url":"https://avatars1.githubusercontent.com/u/39998367?v=4","gravatar_id":"","url":"https://api.github.com/users/mknapphrt","html_url":"https://github.com/mknapphrt","followers_url":"https://api.github.com/users/mknapphrt/followers","following_url":"https://api.github.com/users/mknapphrt/following{/other_user}","gists_url":"https://api.github.com/users/mknapphrt/gists{/gist_id}","starred_url":"https://api.github.com/users/mknapphrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mknapphrt/subscriptions","organizations_url":"https://api.github.com/users/mknapphrt/orgs","repos_url":"https://api.github.com/users/mknapphrt/repos","events_url":"https://api.github.com/users/mknapphrt/events{/privacy}","received_events_url":"https://api.github.com/users/mknapphrt/received_events","type":"User","site_admin":false},"repo":{"id":136365714,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYzNjU3MTQ=","name":"tsdb","full_name":"mknapphrt/tsdb","owner":{"login":"mknapphrt","id":39998367,"node_id":"MDQ6VXNlcjM5OTk4MzY3","avatar_url":"https://avatars1.githubusercontent.com/u/39998367?v=4","gravatar_id":"","url":"https://api.github.com/users/mknapphrt","html_url":"https://github.com/mknapphrt","followers_url":"https://api.github.com/users/mknapphrt/followers","following_url":"https://api.github.com/users/mknapphrt/following{/other_user}","gists_url":"https://api.github.com/users/mknapphrt/gists{/gist_id}","starred_url":"https://api.github.com/users/mknapphrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mknapphrt/subscriptions","organizations_url":"https://api.github.com/users/mknapphrt/orgs","repos_url":"https://api.github.com/users/mknapphrt/repos","events_url":"https://api.github.com/users/mknapphrt/events{/privacy}","received_events_url":"https://api.github.com/users/mknapphrt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mknapphrt/tsdb","description":null,"fork":true,"url":"https://api.github.com/repos/mknapphrt/tsdb","forks_url":"https://api.github.com/repos/mknapphrt/tsdb/forks","keys_url":"https://api.github.com/repos/mknapphrt/tsdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mknapphrt/tsdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mknapphrt/tsdb/teams","hooks_url":"https://api.github.com/repos/mknapphrt/tsdb/hooks","issue_events_url":"https://api.github.com/repos/mknapphrt/tsdb/issues/events{/number}","events_url":"https://api.github.com/repos/mknapphrt/tsdb/events","assignees_url":"https://api.github.com/repos/mknapphrt/tsdb/assignees{/user}","branches_url":"https://api.github.com/repos/mknapphrt/tsdb/branches{/branch}","tags_url":"https://api.github.com/repos/mknapphrt/tsdb/tags","blobs_url":"https://api.github.com/repos/mknapphrt/tsdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mknapphrt/tsdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mknapphrt/tsdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/mknapphrt/tsdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mknapphrt/tsdb/statuses/{sha}","languages_url":"https://api.github.com/repos/mknapphrt/tsdb/languages","stargazers_url":"https://api.github.com/repos/mknapphrt/tsdb/stargazers","contributors_url":"https://api.github.com/repos/mknapphrt/tsdb/contributors","subscribers_url":"https://api.github.com/repos/mknapphrt/tsdb/subscribers","subscription_url":"https://api.github.com/repos/mknapphrt/tsdb/subscription","commits_url":"https://api.github.com/repos/mknapphrt/tsdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/mknapphrt/tsdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/mknapphrt/tsdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/mknapphrt/tsdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/mknapphrt/tsdb/contents/{+path}","compare_url":"https://api.github.com/repos/mknapphrt/tsdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mknapphrt/tsdb/merges","archive_url":"https://api.github.com/repos/mknapphrt/tsdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mknapphrt/tsdb/downloads","issues_url":"https://api.github.com/repos/mknapphrt/tsdb/issues{/number}","pulls_url":"https://api.github.com/repos/mknapphrt/tsdb/pulls{/number}","milestones_url":"https://api.github.com/repos/mknapphrt/tsdb/milestones{/number}","notifications_url":"https://api.github.com/repos/mknapphrt/tsdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mknapphrt/tsdb/labels{/name}","releases_url":"https://api.github.com/repos/mknapphrt/tsdb/releases{/id}","deployments_url":"https://api.github.com/repos/mknapphrt/tsdb/deployments","created_at":"2018-06-06T17:49:51Z","updated_at":"2018-06-06T17:49:53Z","pushed_at":"2018-06-27T18:17:10Z","git_url":"git://github.com/mknapphrt/tsdb.git","ssh_url":"git@github.com:mknapphrt/tsdb.git","clone_url":"https://github.com/mknapphrt/tsdb.git","svn_url":"https://github.com/mknapphrt/tsdb","homepage":null,"size":5853,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"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":"prometheus:master","ref":"master","sha":"c848349f07c83bd38d5d19faa5ea71c7fd8923ea","user":{"login":"prometheus","id":3380462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzODA0NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/3380462?v=4","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":73823302,"node_id":"MDEwOlJlcG9zaXRvcnk3MzgyMzMwMg==","name":"tsdb","full_name":"prometheus/tsdb","owner":{"login":"prometheus","id":3380462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzODA0NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/3380462?v=4","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/tsdb","description":null,"fork":false,"url":"https://api.github.com/repos/prometheus/tsdb","forks_url":"https://api.github.com/repos/prometheus/tsdb/forks","keys_url":"https://api.github.com/repos/prometheus/tsdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/tsdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/tsdb/teams","hooks_url":"https://api.github.com/repos/prometheus/tsdb/hooks","issue_events_url":"https://api.github.com/repos/prometheus/tsdb/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/tsdb/events","assignees_url":"https://api.github.com/repos/prometheus/tsdb/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/tsdb/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/tsdb/tags","blobs_url":"https://api.github.com/repos/prometheus/tsdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/tsdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/tsdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/tsdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/tsdb/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/tsdb/languages","stargazers_url":"https://api.github.com/repos/prometheus/tsdb/stargazers","contributors_url":"https://api.github.com/repos/prometheus/tsdb/contributors","subscribers_url":"https://api.github.com/repos/prometheus/tsdb/subscribers","subscription_url":"https://api.github.com/repos/prometheus/tsdb/subscription","commits_url":"https://api.github.com/repos/prometheus/tsdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/tsdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/tsdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/tsdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/tsdb/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/tsdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/tsdb/merges","archive_url":"https://api.github.com/repos/prometheus/tsdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/tsdb/downloads","issues_url":"https://api.github.com/repos/prometheus/tsdb/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/tsdb/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/tsdb/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/tsdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/tsdb/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/tsdb/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/tsdb/deployments","created_at":"2016-11-15T14:50:03Z","updated_at":"2018-06-28T09:57:10Z","pushed_at":"2018-06-28T09:57:07Z","git_url":"git://github.com/prometheus/tsdb.git","ssh_url":"git@github.com:prometheus/tsdb.git","clone_url":"https://github.com/prometheus/tsdb.git","svn_url":"https://github.com/prometheus/tsdb","homepage":null,"size":5905,"stargazers_count":376,"watchers_count":376,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"archived":false,"open_issues_count":76,"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":77,"open_issues":76,"watchers":376,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/343"},"html":{"href":"https://github.com/prometheus/tsdb/pull/343"},"issue":{"href":"https://api.github.com/repos/prometheus/tsdb/issues/343"},"comments":{"href":"https://api.github.com/repos/prometheus/tsdb/issues/343/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/343/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/343/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/tsdb/statuses/521f642e53695dcc3964805d874c91c17709d3de"}},"author_association":"NONE"}}
{"actor":{"display_login":"brian-brazil"}}