{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/cortex/pulls/comments/105447806","pull_request_review_id":26312220,"id":105447806,"diff_hunk":"@@ -0,0 +1,99 @@\n+package ingester\n+\n+import (\n+\t\"reflect\"\n+\t\"runtime\"\n+\t\"testing\"\n+\t\"time\"\n+\n+\t\"github.com/prometheus/common/log\"\n+\t\"github.com/weaveworks/cortex/ring\"\n+)\n+\n+func defaultIngesterTestConfig() Config {\n+\tconsul := ring.NewMockConsulClient()\n+\treturn Config{\n+\t\tringConfig: ring.Config{\n+\t\t\tConsulConfig: ring.ConsulConfig{\n+\t\t\t\tMock: consul,\n+\t\t\t},\n+\t\t},\n+\n+\t\tNumTokens:       1,\n+\t\tHeartbeatPeriod: 5 * time.Second,\n+\t\tListenPort:      func(i int) *int { return &i }(0),\n+\t\tAddr:            \"localhost\",\n+\t\tHostname:        \"localhost\",\n+\n+\t\tFlushCheckPeriod: 99999 * time.Hour,\n+\t\tMaxChunkIdle:     99999 * time.Hour,\n+\t}\n+}\n+\n+func TestIngesterRestart(t *testing.T) {","path":"ingester/ingester_lifecycle_test.go","position":33,"original_position":33,"commit_id":"8113f830cef9ed7db8a09b95fab9020a80f6a0d3","original_commit_id":"8113f830cef9ed7db8a09b95fab9020a80f6a0d3","user":{"login":"jml","id":125674,"avatar_url":"https://avatars2.githubusercontent.com/u/125674?v=3","gravatar_id":"","url":"https://api.github.com/users/jml","html_url":"https://github.com/jml","followers_url":"https://api.github.com/users/jml/followers","following_url":"https://api.github.com/users/jml/following{/other_user}","gists_url":"https://api.github.com/users/jml/gists{/gist_id}","starred_url":"https://api.github.com/users/jml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jml/subscriptions","organizations_url":"https://api.github.com/users/jml/orgs","repos_url":"https://api.github.com/users/jml/repos","events_url":"https://api.github.com/users/jml/events{/privacy}","received_events_url":"https://api.github.com/users/jml/received_events","type":"User","site_admin":false},"body":"What about restart are we testing? (Please add comment)","created_at":"2017-03-10T17:37:02Z","updated_at":"2017-03-10T17:37:56Z","html_url":"https://github.com/weaveworks/cortex/pull/325#discussion_r105447806","pull_request_url":"https://api.github.com/repos/weaveworks/cortex/pulls/325","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/comments/105447806"},"html":{"href":"https://github.com/weaveworks/cortex/pull/325#discussion_r105447806"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/325"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/cortex/pulls/325","id":109917137,"html_url":"https://github.com/weaveworks/cortex/pull/325","diff_url":"https://github.com/weaveworks/cortex/pull/325.diff","patch_url":"https://github.com/weaveworks/cortex/pull/325.patch","issue_url":"https://api.github.com/repos/weaveworks/cortex/issues/325","number":325,"state":"open","locked":false,"title":"Faster rolling upgrades.","user":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars2.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"body":"Fixes #321 \r\n\r\nIt works!  And its quick...\r\n\r\nTODO\r\n- [x] move ingester lifecycle code into ingester, work out the coupling a bit better\r\n- [x] move ingester shutdown code into ingester (from main.go)\r\n- [x] fallback to flush it transfer fails.\r\n- [x] naming\r\n- [x] check ring logic for new ingester states\r\n- ~ensure ingester flushing stops before transferring chunks~ - shouldn't do this, as we don't want chunks that won't flush to block the transfer.\r\n- ~add an ever-extending timeout on the receiving ingester, when we do timeout auto-join~ - going to leave this for now, can always kill ingesters if they get stuck, will fall back to flushing.\r\n","created_at":"2017-03-09T13:50:52Z","updated_at":"2017-03-10T17:37:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a97299635dc4ec9ef4ba67dd624e22e3db30094e","assignee":{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars2.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false},"assignees":[{"login":"tomwilkie","id":444037,"avatar_url":"https://avatars2.githubusercontent.com/u/444037?v=3","gravatar_id":"","url":"https://api.github.com/users/tomwilkie","html_url":"https://github.com/tomwilkie","followers_url":"https://api.github.com/users/tomwilkie/followers","following_url":"https://api.github.com/users/tomwilkie/following{/other_user}","gists_url":"https://api.github.com/users/tomwilkie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwilkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwilkie/subscriptions","organizations_url":"https://api.github.com/users/tomwilkie/orgs","repos_url":"https://api.github.com/users/tomwilkie/repos","events_url":"https://api.github.com/users/tomwilkie/events{/privacy}","received_events_url":"https://api.github.com/users/tomwilkie/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/weaveworks/cortex/pulls/325/commits","review_comments_url":"https://api.github.com/repos/weaveworks/cortex/pulls/325/comments","review_comment_url":"https://api.github.com/repos/weaveworks/cortex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/cortex/issues/325/comments","statuses_url":"https://api.github.com/repos/weaveworks/cortex/statuses/8113f830cef9ed7db8a09b95fab9020a80f6a0d3","head":{"label":"weaveworks:321-faster-rolling-upgrade","ref":"321-faster-rolling-upgrade","sha":"8113f830cef9ed7db8a09b95fab9020a80f6a0d3","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars2.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":67793333,"name":"cortex","full_name":"weaveworks/cortex","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars2.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/cortex","description":"A multitenant, horizontally scalable Prometheus as a Service","fork":false,"url":"https://api.github.com/repos/weaveworks/cortex","forks_url":"https://api.github.com/repos/weaveworks/cortex/forks","keys_url":"https://api.github.com/repos/weaveworks/cortex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/cortex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/cortex/teams","hooks_url":"https://api.github.com/repos/weaveworks/cortex/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/cortex/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/cortex/events","assignees_url":"https://api.github.com/repos/weaveworks/cortex/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/cortex/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/cortex/tags","blobs_url":"https://api.github.com/repos/weaveworks/cortex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/cortex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/cortex/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/cortex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/cortex/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/cortex/languages","stargazers_url":"https://api.github.com/repos/weaveworks/cortex/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/cortex/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/cortex/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/cortex/subscription","commits_url":"https://api.github.com/repos/weaveworks/cortex/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/cortex/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/cortex/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/cortex/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/cortex/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/cortex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/cortex/merges","archive_url":"https://api.github.com/repos/weaveworks/cortex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/cortex/downloads","issues_url":"https://api.github.com/repos/weaveworks/cortex/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/cortex/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/cortex/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/cortex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/cortex/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/cortex/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/cortex/deployments","created_at":"2016-09-09T11:23:12Z","updated_at":"2017-03-09T19:08:07Z","pushed_at":"2017-03-10T16:47:45Z","git_url":"git://github.com/weaveworks/cortex.git","ssh_url":"git@github.com:weaveworks/cortex.git","clone_url":"https://github.com/weaveworks/cortex.git","svn_url":"https://github.com/weaveworks/cortex","homepage":null,"size":15235,"stargazers_count":111,"watchers_count":111,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":50,"forks":12,"open_issues":50,"watchers":111,"default_branch":"master"}},"base":{"label":"weaveworks:master","ref":"master","sha":"df7080a79bd66aaf9b1da47eb4dc20b4f2c95aaf","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars2.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":67793333,"name":"cortex","full_name":"weaveworks/cortex","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars2.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/cortex","description":"A multitenant, horizontally scalable Prometheus as a Service","fork":false,"url":"https://api.github.com/repos/weaveworks/cortex","forks_url":"https://api.github.com/repos/weaveworks/cortex/forks","keys_url":"https://api.github.com/repos/weaveworks/cortex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/cortex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/cortex/teams","hooks_url":"https://api.github.com/repos/weaveworks/cortex/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/cortex/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/cortex/events","assignees_url":"https://api.github.com/repos/weaveworks/cortex/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/cortex/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/cortex/tags","blobs_url":"https://api.github.com/repos/weaveworks/cortex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/cortex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/cortex/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/cortex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/cortex/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/cortex/languages","stargazers_url":"https://api.github.com/repos/weaveworks/cortex/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/cortex/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/cortex/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/cortex/subscription","commits_url":"https://api.github.com/repos/weaveworks/cortex/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/cortex/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/cortex/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/cortex/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/cortex/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/cortex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/cortex/merges","archive_url":"https://api.github.com/repos/weaveworks/cortex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/cortex/downloads","issues_url":"https://api.github.com/repos/weaveworks/cortex/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/cortex/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/cortex/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/cortex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/cortex/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/cortex/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/cortex/deployments","created_at":"2016-09-09T11:23:12Z","updated_at":"2017-03-09T19:08:07Z","pushed_at":"2017-03-10T16:47:45Z","git_url":"git://github.com/weaveworks/cortex.git","ssh_url":"git@github.com:weaveworks/cortex.git","clone_url":"https://github.com/weaveworks/cortex.git","svn_url":"https://github.com/weaveworks/cortex","homepage":null,"size":15235,"stargazers_count":111,"watchers_count":111,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":50,"forks":12,"open_issues":50,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/325"},"html":{"href":"https://github.com/weaveworks/cortex/pull/325"},"issue":{"href":"https://api.github.com/repos/weaveworks/cortex/issues/325"},"comments":{"href":"https://api.github.com/repos/weaveworks/cortex/issues/325/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/325/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/cortex/pulls/325/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/cortex/statuses/8113f830cef9ed7db8a09b95fab9020a80f6a0d3"}}}}
{"actor":{"display_login":"jml"}}