{"action":"created","comment":{"url":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments/207481083","pull_request_review_id":143093713,"id":207481083,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzQ4MTA4Mw==","diff_hunk":"@@ -266,6 +267,40 @@ func TestCounterSeriesIterator(t *testing.T) {\n \ttestutil.Equals(t, exp, res)\n }\n \n+func TestCounterSeriesIteratorSeek(t *testing.T) {\n+\tdefer leaktest.CheckTimeout(t, 10*time.Second)()\n+\n+\tchunks := [][]sample{\n+\t\t{{100, 10}, {200, 20}, {300, 10}, {400, 20}, {400, 5}},\n+\t}\n+\texp := []sample{\n+\t\t{100, 10}, {200, 20}, {300, 30}, {400, 40},\n+\t}\n+\n+\tvar its []chunkenc.Iterator\n+\tfor _, c := range chunks {\n+\t\tits = append(its, newSampleIterator(c))\n+\t}\n+\n+\tx := NewCounterSeriesIterator(its...)\n+\tvar it *storage.BufferedSeriesIterator","path":"pkg/compact/downsample/downsample_test.go","position":28,"original_position":28,"commit_id":"8af263c131ce357722f2f1f96925b7bc09bbdde9","original_commit_id":"8af263c131ce357722f2f1f96925b7bc09bbdde9","user":{"login":"Bplotka","id":6950331,"node_id":"MDQ6VXNlcjY5NTAzMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/6950331?v=4","gravatar_id":"","url":"https://api.github.com/users/Bplotka","html_url":"https://github.com/Bplotka","followers_url":"https://api.github.com/users/Bplotka/followers","following_url":"https://api.github.com/users/Bplotka/following{/other_user}","gists_url":"https://api.github.com/users/Bplotka/gists{/gist_id}","starred_url":"https://api.github.com/users/Bplotka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bplotka/subscriptions","organizations_url":"https://api.github.com/users/Bplotka/orgs","repos_url":"https://api.github.com/users/Bplotka/repos","events_url":"https://api.github.com/users/Bplotka/events{/privacy}","received_events_url":"https://api.github.com/users/Bplotka/received_events","type":"User","site_admin":false},"body":"Additionally, I would add just comment that the regression could be seen while using `matrixIterSlice` in `PromQL` - that might be useful.","created_at":"2018-08-03T08:49:58Z","updated_at":"2018-08-03T08:50:06Z","html_url":"https://github.com/improbable-eng/thanos/pull/457#discussion_r207481083","pull_request_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/457","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments/207481083"},"html":{"href":"https://github.com/improbable-eng/thanos/pull/457#discussion_r207481083"},"pull_request":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/457"}},"in_reply_to_id":207464400},"pull_request":{"url":"https://api.github.com/repos/improbable-eng/thanos/pulls/457","id":205635825,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjM1ODI1","html_url":"https://github.com/improbable-eng/thanos/pull/457","diff_url":"https://github.com/improbable-eng/thanos/pull/457.diff","patch_url":"https://github.com/improbable-eng/thanos/pull/457.patch","issue_url":"https://api.github.com/repos/improbable-eng/thanos/issues/457","number":457,"state":"open","locked":false,"title":"Fixed miss current sample when do to seek to specify timestamp","user":{"login":"jojohappy","id":2532941,"node_id":"MDQ6VXNlcjI1MzI5NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2532941?v=4","gravatar_id":"","url":"https://api.github.com/users/jojohappy","html_url":"https://github.com/jojohappy","followers_url":"https://api.github.com/users/jojohappy/followers","following_url":"https://api.github.com/users/jojohappy/following{/other_user}","gists_url":"https://api.github.com/users/jojohappy/gists{/gist_id}","starred_url":"https://api.github.com/users/jojohappy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojohappy/subscriptions","organizations_url":"https://api.github.com/users/jojohappy/orgs","repos_url":"https://api.github.com/users/jojohappy/repos","events_url":"https://api.github.com/users/jojohappy/events{/privacy}","received_events_url":"https://api.github.com/users/jojohappy/received_events","type":"User","site_admin":false},"body":"<!--\r\n    Keep PR title verbose enough and add prefix telling\r\n    about what components it touches e.g \"query:\" or \".*:\"\r\n-->\r\n\r\n## Changes\r\nTo switch the `it.At()` position to read the current item in the `CounterSeriesIterator.Seek()` first. If not, it will skip the current item.\r\n\r\n<!-- Enumerate changes you made -->\r\n\r\n## Verification\r\n\r\n<!-- How you tested it? How do you know it works? -->\r\nrelated #439 ","created_at":"2018-08-02T06:59:04Z","updated_at":"2018-08-03T08:50:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94df8dbdd37323f55869876703a5782868998227","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/457/commits","review_comments_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/457/comments","review_comment_url":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/improbable-eng/thanos/issues/457/comments","statuses_url":"https://api.github.com/repos/improbable-eng/thanos/statuses/8af263c131ce357722f2f1f96925b7bc09bbdde9","head":{"label":"jojohappy:fix_counter_iterator_miss_current_sample","ref":"fix_counter_iterator_miss_current_sample","sha":"8af263c131ce357722f2f1f96925b7bc09bbdde9","user":{"login":"jojohappy","id":2532941,"node_id":"MDQ6VXNlcjI1MzI5NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2532941?v=4","gravatar_id":"","url":"https://api.github.com/users/jojohappy","html_url":"https://github.com/jojohappy","followers_url":"https://api.github.com/users/jojohappy/followers","following_url":"https://api.github.com/users/jojohappy/following{/other_user}","gists_url":"https://api.github.com/users/jojohappy/gists{/gist_id}","starred_url":"https://api.github.com/users/jojohappy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojohappy/subscriptions","organizations_url":"https://api.github.com/users/jojohappy/orgs","repos_url":"https://api.github.com/users/jojohappy/repos","events_url":"https://api.github.com/users/jojohappy/events{/privacy}","received_events_url":"https://api.github.com/users/jojohappy/received_events","type":"User","site_admin":false},"repo":{"id":140850341,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4NTAzNDE=","name":"thanos","full_name":"jojohappy/thanos","owner":{"login":"jojohappy","id":2532941,"node_id":"MDQ6VXNlcjI1MzI5NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2532941?v=4","gravatar_id":"","url":"https://api.github.com/users/jojohappy","html_url":"https://github.com/jojohappy","followers_url":"https://api.github.com/users/jojohappy/followers","following_url":"https://api.github.com/users/jojohappy/following{/other_user}","gists_url":"https://api.github.com/users/jojohappy/gists{/gist_id}","starred_url":"https://api.github.com/users/jojohappy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojohappy/subscriptions","organizations_url":"https://api.github.com/users/jojohappy/orgs","repos_url":"https://api.github.com/users/jojohappy/repos","events_url":"https://api.github.com/users/jojohappy/events{/privacy}","received_events_url":"https://api.github.com/users/jojohappy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jojohappy/thanos","description":"Highly available Prometheus setup with long term storage capabilities.","fork":true,"url":"https://api.github.com/repos/jojohappy/thanos","forks_url":"https://api.github.com/repos/jojohappy/thanos/forks","keys_url":"https://api.github.com/repos/jojohappy/thanos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jojohappy/thanos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jojohappy/thanos/teams","hooks_url":"https://api.github.com/repos/jojohappy/thanos/hooks","issue_events_url":"https://api.github.com/repos/jojohappy/thanos/issues/events{/number}","events_url":"https://api.github.com/repos/jojohappy/thanos/events","assignees_url":"https://api.github.com/repos/jojohappy/thanos/assignees{/user}","branches_url":"https://api.github.com/repos/jojohappy/thanos/branches{/branch}","tags_url":"https://api.github.com/repos/jojohappy/thanos/tags","blobs_url":"https://api.github.com/repos/jojohappy/thanos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jojohappy/thanos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jojohappy/thanos/git/refs{/sha}","trees_url":"https://api.github.com/repos/jojohappy/thanos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jojohappy/thanos/statuses/{sha}","languages_url":"https://api.github.com/repos/jojohappy/thanos/languages","stargazers_url":"https://api.github.com/repos/jojohappy/thanos/stargazers","contributors_url":"https://api.github.com/repos/jojohappy/thanos/contributors","subscribers_url":"https://api.github.com/repos/jojohappy/thanos/subscribers","subscription_url":"https://api.github.com/repos/jojohappy/thanos/subscription","commits_url":"https://api.github.com/repos/jojohappy/thanos/commits{/sha}","git_commits_url":"https://api.github.com/repos/jojohappy/thanos/git/commits{/sha}","comments_url":"https://api.github.com/repos/jojohappy/thanos/comments{/number}","issue_comment_url":"https://api.github.com/repos/jojohappy/thanos/issues/comments{/number}","contents_url":"https://api.github.com/repos/jojohappy/thanos/contents/{+path}","compare_url":"https://api.github.com/repos/jojohappy/thanos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jojohappy/thanos/merges","archive_url":"https://api.github.com/repos/jojohappy/thanos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jojohappy/thanos/downloads","issues_url":"https://api.github.com/repos/jojohappy/thanos/issues{/number}","pulls_url":"https://api.github.com/repos/jojohappy/thanos/pulls{/number}","milestones_url":"https://api.github.com/repos/jojohappy/thanos/milestones{/number}","notifications_url":"https://api.github.com/repos/jojohappy/thanos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jojohappy/thanos/labels{/name}","releases_url":"https://api.github.com/repos/jojohappy/thanos/releases{/id}","deployments_url":"https://api.github.com/repos/jojohappy/thanos/deployments","created_at":"2018-07-13T13:27:57Z","updated_at":"2018-08-02T07:04:28Z","pushed_at":"2018-08-03T07:30:10Z","git_url":"git://github.com/jojohappy/thanos.git","ssh_url":"git@github.com:jojohappy/thanos.git","clone_url":"https://github.com/jojohappy/thanos.git","svn_url":"https://github.com/jojohappy/thanos","homepage":"","size":55058,"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":"improbable-eng:master","ref":"master","sha":"f259e5625ae9be2db754b3a095d0530fdb107181","user":{"login":"improbable-eng","id":26084283,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDg0Mjgz","avatar_url":"https://avatars2.githubusercontent.com/u/26084283?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-eng","html_url":"https://github.com/improbable-eng","followers_url":"https://api.github.com/users/improbable-eng/followers","following_url":"https://api.github.com/users/improbable-eng/following{/other_user}","gists_url":"https://api.github.com/users/improbable-eng/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-eng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-eng/subscriptions","organizations_url":"https://api.github.com/users/improbable-eng/orgs","repos_url":"https://api.github.com/users/improbable-eng/repos","events_url":"https://api.github.com/users/improbable-eng/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-eng/received_events","type":"Organization","site_admin":false},"repo":{"id":109162639,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkxNjI2Mzk=","name":"thanos","full_name":"improbable-eng/thanos","owner":{"login":"improbable-eng","id":26084283,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDg0Mjgz","avatar_url":"https://avatars2.githubusercontent.com/u/26084283?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-eng","html_url":"https://github.com/improbable-eng","followers_url":"https://api.github.com/users/improbable-eng/followers","following_url":"https://api.github.com/users/improbable-eng/following{/other_user}","gists_url":"https://api.github.com/users/improbable-eng/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-eng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-eng/subscriptions","organizations_url":"https://api.github.com/users/improbable-eng/orgs","repos_url":"https://api.github.com/users/improbable-eng/repos","events_url":"https://api.github.com/users/improbable-eng/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-eng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/improbable-eng/thanos","description":"Highly available Prometheus setup with long term storage capabilities.","fork":false,"url":"https://api.github.com/repos/improbable-eng/thanos","forks_url":"https://api.github.com/repos/improbable-eng/thanos/forks","keys_url":"https://api.github.com/repos/improbable-eng/thanos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/improbable-eng/thanos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/improbable-eng/thanos/teams","hooks_url":"https://api.github.com/repos/improbable-eng/thanos/hooks","issue_events_url":"https://api.github.com/repos/improbable-eng/thanos/issues/events{/number}","events_url":"https://api.github.com/repos/improbable-eng/thanos/events","assignees_url":"https://api.github.com/repos/improbable-eng/thanos/assignees{/user}","branches_url":"https://api.github.com/repos/improbable-eng/thanos/branches{/branch}","tags_url":"https://api.github.com/repos/improbable-eng/thanos/tags","blobs_url":"https://api.github.com/repos/improbable-eng/thanos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/improbable-eng/thanos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/improbable-eng/thanos/git/refs{/sha}","trees_url":"https://api.github.com/repos/improbable-eng/thanos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/improbable-eng/thanos/statuses/{sha}","languages_url":"https://api.github.com/repos/improbable-eng/thanos/languages","stargazers_url":"https://api.github.com/repos/improbable-eng/thanos/stargazers","contributors_url":"https://api.github.com/repos/improbable-eng/thanos/contributors","subscribers_url":"https://api.github.com/repos/improbable-eng/thanos/subscribers","subscription_url":"https://api.github.com/repos/improbable-eng/thanos/subscription","commits_url":"https://api.github.com/repos/improbable-eng/thanos/commits{/sha}","git_commits_url":"https://api.github.com/repos/improbable-eng/thanos/git/commits{/sha}","comments_url":"https://api.github.com/repos/improbable-eng/thanos/comments{/number}","issue_comment_url":"https://api.github.com/repos/improbable-eng/thanos/issues/comments{/number}","contents_url":"https://api.github.com/repos/improbable-eng/thanos/contents/{+path}","compare_url":"https://api.github.com/repos/improbable-eng/thanos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/improbable-eng/thanos/merges","archive_url":"https://api.github.com/repos/improbable-eng/thanos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/improbable-eng/thanos/downloads","issues_url":"https://api.github.com/repos/improbable-eng/thanos/issues{/number}","pulls_url":"https://api.github.com/repos/improbable-eng/thanos/pulls{/number}","milestones_url":"https://api.github.com/repos/improbable-eng/thanos/milestones{/number}","notifications_url":"https://api.github.com/repos/improbable-eng/thanos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/improbable-eng/thanos/labels{/name}","releases_url":"https://api.github.com/repos/improbable-eng/thanos/releases{/id}","deployments_url":"https://api.github.com/repos/improbable-eng/thanos/deployments","created_at":"2017-11-01T17:38:03Z","updated_at":"2018-08-03T06:35:02Z","pushed_at":"2018-08-03T07:30:11Z","git_url":"git://github.com/improbable-eng/thanos.git","ssh_url":"git@github.com:improbable-eng/thanos.git","clone_url":"https://github.com/improbable-eng/thanos.git","svn_url":"https://github.com/improbable-eng/thanos","homepage":"","size":55065,"stargazers_count":1752,"watchers_count":1752,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":69,"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":108,"open_issues":69,"watchers":1752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/457"},"html":{"href":"https://github.com/improbable-eng/thanos/pull/457"},"issue":{"href":"https://api.github.com/repos/improbable-eng/thanos/issues/457"},"comments":{"href":"https://api.github.com/repos/improbable-eng/thanos/issues/457/comments"},"review_comments":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/457/comments"},"review_comment":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/improbable-eng/thanos/pulls/457/commits"},"statuses":{"href":"https://api.github.com/repos/improbable-eng/thanos/statuses/8af263c131ce357722f2f1f96925b7bc09bbdde9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Bplotka"}}