{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/tsdb/pulls/comments/237098316","pull_request_review_id":179313686,"id":237098316,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzA5ODMxNg==","diff_hunk":"@@ -118,27 +117,15 @@ func Checkpoint(w *wal.WAL, from, to int, keep func(id uint64) bool, mint int64)\n \t\t\t// Ignore WAL files below the checkpoint. They shouldn't exist to begin with.\n \t\t\tfrom = last\n \n-\t\t\tr, err := wal.NewSegmentsReader(filepath.Join(w.Dir(), dir))\n-\t\t\tif err != nil {\n-\t\t\t\treturn nil, errors.Wrap(err, \"open last checkpoint\")\n-\t\t\t}\n-\t\t\tdefer r.Close()\n-\t\t\tclosers = append(closers, r)","path":"checkpoint.go","position":43,"original_position":43,"commit_id":"221c5db502a266ae5ad77b68dc73c4d950450749","original_commit_id":"221c5db502a266ae5ad77b68dc73c4d950450749","user":{"login":"krasi-georgiev","id":8903888,"node_id":"MDQ6VXNlcjg5MDM4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/8903888?v=4","gravatar_id":"","url":"https://api.github.com/users/krasi-georgiev","html_url":"https://github.com/krasi-georgiev","followers_url":"https://api.github.com/users/krasi-georgiev/followers","following_url":"https://api.github.com/users/krasi-georgiev/following{/other_user}","gists_url":"https://api.github.com/users/krasi-georgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/krasi-georgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krasi-georgiev/subscriptions","organizations_url":"https://api.github.com/users/krasi-georgiev/orgs","repos_url":"https://api.github.com/users/krasi-georgiev/repos","events_url":"https://api.github.com/users/krasi-georgiev/events{/privacy}","received_events_url":"https://api.github.com/users/krasi-georgiev/received_events","type":"User","site_admin":false},"body":"ah nice, so this PR is correct?","created_at":"2018-11-28T14:11:19Z","updated_at":"2018-11-28T14:11:19Z","html_url":"https://github.com/prometheus/tsdb/pull/449#discussion_r237098316","pull_request_url":"https://api.github.com/repos/prometheus/tsdb/pulls/449","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/comments/237098316"},"html":{"href":"https://github.com/prometheus/tsdb/pull/449#discussion_r237098316"},"pull_request":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/449"}},"in_reply_to_id":232649747},"pull_request":{"url":"https://api.github.com/repos/prometheus/tsdb/pulls/449","id":230127771,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMTI3Nzcx","html_url":"https://github.com/prometheus/tsdb/pull/449","diff_url":"https://github.com/prometheus/tsdb/pull/449.diff","patch_url":"https://github.com/prometheus/tsdb/pull/449.patch","issue_url":"https://api.github.com/repos/prometheus/tsdb/issues/449","number":449,"state":"open","locked":false,"title":"refactor NewSegmentsRangeReader to take multi WAL ranges","user":{"login":"krasi-georgiev","id":8903888,"node_id":"MDQ6VXNlcjg5MDM4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/8903888?v=4","gravatar_id":"","url":"https://api.github.com/users/krasi-georgiev","html_url":"https://github.com/krasi-georgiev","followers_url":"https://api.github.com/users/krasi-georgiev/followers","following_url":"https://api.github.com/users/krasi-georgiev/following{/other_user}","gists_url":"https://api.github.com/users/krasi-georgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/krasi-georgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krasi-georgiev/subscriptions","organizations_url":"https://api.github.com/users/krasi-georgiev/orgs","repos_url":"https://api.github.com/users/krasi-georgiev/repos","events_url":"https://api.github.com/users/krasi-georgiev/events{/privacy}","received_events_url":"https://api.github.com/users/krasi-georgiev/received_events","type":"User","site_admin":false},"body":"In case of an error when checkpointing the WAL the error doesn't show\r\nthe exact WAL index that is corrupter. this is because it uses\r\nMultiReader to read multiply WAL files.\r\nThis refactoring allows the NewSegmentsRangeReader to take more than a\r\nsingle WAL range and it reads all of the ranges by iterating each one.\r\n\r\nthis changes the logs from\r\n```\r\ncreate checkpoint: read segments: corruption after 4841144384 bytes:...\r\n```\r\nto\r\n```create checkpoint: read segments: corruption in segment data/wal/00017351 at 123142208: ...```\r\n\r\nSigned-off-by: Krasi Georgiev <kgeorgie@redhat.com>","created_at":"2018-11-12T13:05:41Z","updated_at":"2018-11-28T14:11:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f7aa194a587c2b7cc97c48510a574a81a86e831","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/tsdb/pulls/449/commits","review_comments_url":"https://api.github.com/repos/prometheus/tsdb/pulls/449/comments","review_comment_url":"https://api.github.com/repos/prometheus/tsdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/tsdb/issues/449/comments","statuses_url":"https://api.github.com/repos/prometheus/tsdb/statuses/221c5db502a266ae5ad77b68dc73c4d950450749","head":{"label":"krasi-georgiev:range-wal-reader-refactor","ref":"range-wal-reader-refactor","sha":"221c5db502a266ae5ad77b68dc73c4d950450749","user":{"login":"krasi-georgiev","id":8903888,"node_id":"MDQ6VXNlcjg5MDM4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/8903888?v=4","gravatar_id":"","url":"https://api.github.com/users/krasi-georgiev","html_url":"https://github.com/krasi-georgiev","followers_url":"https://api.github.com/users/krasi-georgiev/followers","following_url":"https://api.github.com/users/krasi-georgiev/following{/other_user}","gists_url":"https://api.github.com/users/krasi-georgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/krasi-georgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krasi-georgiev/subscriptions","organizations_url":"https://api.github.com/users/krasi-georgiev/orgs","repos_url":"https://api.github.com/users/krasi-georgiev/repos","events_url":"https://api.github.com/users/krasi-georgiev/events{/privacy}","received_events_url":"https://api.github.com/users/krasi-georgiev/received_events","type":"User","site_admin":false},"repo":{"id":102941912,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI5NDE5MTI=","name":"tsdb","full_name":"krasi-georgiev/tsdb","private":false,"owner":{"login":"krasi-georgiev","id":8903888,"node_id":"MDQ6VXNlcjg5MDM4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/8903888?v=4","gravatar_id":"","url":"https://api.github.com/users/krasi-georgiev","html_url":"https://github.com/krasi-georgiev","followers_url":"https://api.github.com/users/krasi-georgiev/followers","following_url":"https://api.github.com/users/krasi-georgiev/following{/other_user}","gists_url":"https://api.github.com/users/krasi-georgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/krasi-georgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krasi-georgiev/subscriptions","organizations_url":"https://api.github.com/users/krasi-georgiev/orgs","repos_url":"https://api.github.com/users/krasi-georgiev/repos","events_url":"https://api.github.com/users/krasi-georgiev/events{/privacy}","received_events_url":"https://api.github.com/users/krasi-georgiev/received_events","type":"User","site_admin":false},"html_url":"https://github.com/krasi-georgiev/tsdb","description":null,"fork":true,"url":"https://api.github.com/repos/krasi-georgiev/tsdb","forks_url":"https://api.github.com/repos/krasi-georgiev/tsdb/forks","keys_url":"https://api.github.com/repos/krasi-georgiev/tsdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krasi-georgiev/tsdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krasi-georgiev/tsdb/teams","hooks_url":"https://api.github.com/repos/krasi-georgiev/tsdb/hooks","issue_events_url":"https://api.github.com/repos/krasi-georgiev/tsdb/issues/events{/number}","events_url":"https://api.github.com/repos/krasi-georgiev/tsdb/events","assignees_url":"https://api.github.com/repos/krasi-georgiev/tsdb/assignees{/user}","branches_url":"https://api.github.com/repos/krasi-georgiev/tsdb/branches{/branch}","tags_url":"https://api.github.com/repos/krasi-georgiev/tsdb/tags","blobs_url":"https://api.github.com/repos/krasi-georgiev/tsdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krasi-georgiev/tsdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krasi-georgiev/tsdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/krasi-georgiev/tsdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krasi-georgiev/tsdb/statuses/{sha}","languages_url":"https://api.github.com/repos/krasi-georgiev/tsdb/languages","stargazers_url":"https://api.github.com/repos/krasi-georgiev/tsdb/stargazers","contributors_url":"https://api.github.com/repos/krasi-georgiev/tsdb/contributors","subscribers_url":"https://api.github.com/repos/krasi-georgiev/tsdb/subscribers","subscription_url":"https://api.github.com/repos/krasi-georgiev/tsdb/subscription","commits_url":"https://api.github.com/repos/krasi-georgiev/tsdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/krasi-georgiev/tsdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/krasi-georgiev/tsdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/krasi-georgiev/tsdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/krasi-georgiev/tsdb/contents/{+path}","compare_url":"https://api.github.com/repos/krasi-georgiev/tsdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krasi-georgiev/tsdb/merges","archive_url":"https://api.github.com/repos/krasi-georgiev/tsdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krasi-georgiev/tsdb/downloads","issues_url":"https://api.github.com/repos/krasi-georgiev/tsdb/issues{/number}","pulls_url":"https://api.github.com/repos/krasi-georgiev/tsdb/pulls{/number}","milestones_url":"https://api.github.com/repos/krasi-georgiev/tsdb/milestones{/number}","notifications_url":"https://api.github.com/repos/krasi-georgiev/tsdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krasi-georgiev/tsdb/labels{/name}","releases_url":"https://api.github.com/repos/krasi-georgiev/tsdb/releases{/id}","deployments_url":"https://api.github.com/repos/krasi-georgiev/tsdb/deployments","created_at":"2017-09-09T09:08:12Z","updated_at":"2018-09-16T16:21:47Z","pushed_at":"2018-11-28T13:15:19Z","git_url":"git://github.com/krasi-georgiev/tsdb.git","ssh_url":"git@github.com:krasi-georgiev/tsdb.git","clone_url":"https://github.com/krasi-georgiev/tsdb.git","svn_url":"https://github.com/krasi-georgiev/tsdb","homepage":null,"size":6130,"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":"171fc4ab5da16793145d0e1df4403a073b1d2f78","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","private":false,"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},"html_url":"https://github.com/prometheus/tsdb","description":"The Prometheus time series database layer.","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-11-28T13:15:19Z","pushed_at":"2018-11-28T13:15:13Z","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":"","size":6121,"stargazers_count":485,"watchers_count":485,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":101,"mirror_url":null,"archived":false,"open_issues_count":58,"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":101,"open_issues":58,"watchers":485,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/449"},"html":{"href":"https://github.com/prometheus/tsdb/pull/449"},"issue":{"href":"https://api.github.com/repos/prometheus/tsdb/issues/449"},"comments":{"href":"https://api.github.com/repos/prometheus/tsdb/issues/449/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/449/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/tsdb/pulls/449/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/tsdb/statuses/221c5db502a266ae5ad77b68dc73c4d950450749"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"krasi-georgiev"}}