{"action":"created","comment":{"url":"https://api.github.com/repos/m3db/m3db/pulls/comments/185301175","pull_request_review_id":116661671,"id":185301175,"diff_hunk":"@@ -191,6 +191,9 @@ func (mgr *tickManager) Tick(forceType forceType) error {\n \t\t\tbreak\n \t\t}\n \t\tmgr.sleepFn(interval)\n+\t\t// Check again at the end of each sleep to see if it\n+\t\t// has changed.","path":"storage/tick.go","position":5,"original_position":5,"commit_id":"dee5e1bd8b3fde1ca12e9ed26242ed674d1d8611","original_commit_id":"dee5e1bd8b3fde1ca12e9ed26242ed674d1d8611","user":{"login":"richardartoul","id":9171254,"avatar_url":"https://avatars1.githubusercontent.com/u/9171254?v=4","gravatar_id":"","url":"https://api.github.com/users/richardartoul","html_url":"https://github.com/richardartoul","followers_url":"https://api.github.com/users/richardartoul/followers","following_url":"https://api.github.com/users/richardartoul/following{/other_user}","gists_url":"https://api.github.com/users/richardartoul/gists{/gist_id}","starred_url":"https://api.github.com/users/richardartoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardartoul/subscriptions","organizations_url":"https://api.github.com/users/richardartoul/orgs","repos_url":"https://api.github.com/users/richardartoul/repos","events_url":"https://api.github.com/users/richardartoul/events{/privacy}","received_events_url":"https://api.github.com/users/richardartoul/received_events","type":"User","site_admin":false},"body":"sure","created_at":"2018-05-01T18:48:12Z","updated_at":"2018-05-01T18:48:12Z","html_url":"https://github.com/m3db/m3db/pull/543#discussion_r185301175","pull_request_url":"https://api.github.com/repos/m3db/m3db/pulls/543","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/m3db/m3db/pulls/comments/185301175"},"html":{"href":"https://github.com/m3db/m3db/pull/543#discussion_r185301175"},"pull_request":{"href":"https://api.github.com/repos/m3db/m3db/pulls/543"}},"in_reply_to_id":185285941},"pull_request":{"url":"https://api.github.com/repos/m3db/m3db/pulls/543","id":184124288,"html_url":"https://github.com/m3db/m3db/pull/543","diff_url":"https://github.com/m3db/m3db/pull/543.diff","patch_url":"https://github.com/m3db/m3db/pull/543.patch","issue_url":"https://api.github.com/repos/m3db/m3db/issues/543","number":543,"state":"open","locked":false,"title":"Fix various bugs that were causing data loss during bootstrap","user":{"login":"richardartoul","id":9171254,"avatar_url":"https://avatars1.githubusercontent.com/u/9171254?v=4","gravatar_id":"","url":"https://api.github.com/users/richardartoul","html_url":"https://github.com/richardartoul","followers_url":"https://api.github.com/users/richardartoul/followers","following_url":"https://api.github.com/users/richardartoul/following{/other_user}","gists_url":"https://api.github.com/users/richardartoul/gists{/gist_id}","starred_url":"https://api.github.com/users/richardartoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardartoul/subscriptions","organizations_url":"https://api.github.com/users/richardartoul/orgs","repos_url":"https://api.github.com/users/richardartoul/repos","events_url":"https://api.github.com/users/richardartoul/events{/privacy}","received_events_url":"https://api.github.com/users/richardartoul/received_events","type":"User","site_admin":false},"body":"This P.R address four different bugs that collectively contributed towards data loss during node bootstrap:\r\n\r\n- [x] Modify MinMax on series buffer to take into account whether or not a series buffer bucket was drained or not. This is important because if we don't do this, the bootstrap process will end up putting bootstrapped blocks into buckets that are already drained and the data will be lost forever. In addition, it changes the series buffer Bootstrap method to return an error if the caller tries to bootstrap a block it contains, but that has already been drained.\r\n- [x] Modify storage package to prevent shards/block combinations from being flush until a complete tick has elapsed since blockStart.Add(blockSize).Add(bufferPast). This will guarantee that at least a complete tick elapses between bootstrapped blocks being loaded into a series buffer bucket and the series Flush method being called. This is important because without this restriction, it was possible for bootstrapped blocks to be loaded into a series buffer bucket that was not yet drained, but would also not get drained before flush and the bootstrapped blocks would be lost.\r\n- [x] Fix the series.Bootstrap and mergeBlockWithLock methods to not throw away bootstrapped blocks when the merge codepath was triggered. Previously, we would end up merging blocks into the wrong object, and the object that they were merged into would get overwritten and blocks would be lost.\r\n- [x] Fix the Block.Merge() and block.Stream() functions to not cause double-free of the segment reads (which would lead to panics) \r\n","created_at":"2018-04-25T18:28:42Z","updated_at":"2018-05-01T18:48:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e596179bfcf885ffb3456080f0f6f6ee650b6d2a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"prateek","id":199982,"avatar_url":"https://avatars3.githubusercontent.com/u/199982?v=4","gravatar_id":"","url":"https://api.github.com/users/prateek","html_url":"https://github.com/prateek","followers_url":"https://api.github.com/users/prateek/followers","following_url":"https://api.github.com/users/prateek/following{/other_user}","gists_url":"https://api.github.com/users/prateek/gists{/gist_id}","starred_url":"https://api.github.com/users/prateek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateek/subscriptions","organizations_url":"https://api.github.com/users/prateek/orgs","repos_url":"https://api.github.com/users/prateek/repos","events_url":"https://api.github.com/users/prateek/events{/privacy}","received_events_url":"https://api.github.com/users/prateek/received_events","type":"User","site_admin":false},{"login":"justinjc","id":596351,"avatar_url":"https://avatars1.githubusercontent.com/u/596351?v=4","gravatar_id":"","url":"https://api.github.com/users/justinjc","html_url":"https://github.com/justinjc","followers_url":"https://api.github.com/users/justinjc/followers","following_url":"https://api.github.com/users/justinjc/following{/other_user}","gists_url":"https://api.github.com/users/justinjc/gists{/gist_id}","starred_url":"https://api.github.com/users/justinjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinjc/subscriptions","organizations_url":"https://api.github.com/users/justinjc/orgs","repos_url":"https://api.github.com/users/justinjc/repos","events_url":"https://api.github.com/users/justinjc/events{/privacy}","received_events_url":"https://api.github.com/users/justinjc/received_events","type":"User","site_admin":false},{"login":"katezaps","id":7412903,"avatar_url":"https://avatars3.githubusercontent.com/u/7412903?v=4","gravatar_id":"","url":"https://api.github.com/users/katezaps","html_url":"https://github.com/katezaps","followers_url":"https://api.github.com/users/katezaps/followers","following_url":"https://api.github.com/users/katezaps/following{/other_user}","gists_url":"https://api.github.com/users/katezaps/gists{/gist_id}","starred_url":"https://api.github.com/users/katezaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katezaps/subscriptions","organizations_url":"https://api.github.com/users/katezaps/orgs","repos_url":"https://api.github.com/users/katezaps/repos","events_url":"https://api.github.com/users/katezaps/events{/privacy}","received_events_url":"https://api.github.com/users/katezaps/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/m3db/m3db/pulls/543/commits","review_comments_url":"https://api.github.com/repos/m3db/m3db/pulls/543/comments","review_comment_url":"https://api.github.com/repos/m3db/m3db/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m3db/m3db/issues/543/comments","statuses_url":"https://api.github.com/repos/m3db/m3db/statuses/dee5e1bd8b3fde1ca12e9ed26242ed674d1d8611","head":{"label":"m3db:ra/fix-data-loss","ref":"ra/fix-data-loss","sha":"dee5e1bd8b3fde1ca12e9ed26242ed674d1d8611","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":61153677,"name":"m3db","full_name":"m3db/m3db","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3db","description":"A distributed time series database using M3TSZ float64 compression ","fork":false,"url":"https://api.github.com/repos/m3db/m3db","forks_url":"https://api.github.com/repos/m3db/m3db/forks","keys_url":"https://api.github.com/repos/m3db/m3db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3db/teams","hooks_url":"https://api.github.com/repos/m3db/m3db/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3db/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3db/events","assignees_url":"https://api.github.com/repos/m3db/m3db/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3db/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3db/tags","blobs_url":"https://api.github.com/repos/m3db/m3db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3db/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3db/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3db/languages","stargazers_url":"https://api.github.com/repos/m3db/m3db/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3db/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3db/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3db/subscription","commits_url":"https://api.github.com/repos/m3db/m3db/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3db/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3db/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3db/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3db/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3db/merges","archive_url":"https://api.github.com/repos/m3db/m3db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3db/downloads","issues_url":"https://api.github.com/repos/m3db/m3db/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3db/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3db/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3db/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3db/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3db/deployments","created_at":"2016-06-14T20:29:45Z","updated_at":"2018-05-01T15:37:55Z","pushed_at":"2018-05-01T16:00:40Z","git_url":"git://github.com/m3db/m3db.git","ssh_url":"git@github.com:m3db/m3db.git","clone_url":"https://github.com/m3db/m3db.git","svn_url":"https://github.com/m3db/m3db","homepage":"http://m3db.github.io/m3db/","size":7039,"stargazers_count":145,"watchers_count":145,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":74,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":10,"open_issues":74,"watchers":145,"default_branch":"master"}},"base":{"label":"m3db:master","ref":"master","sha":"a37ec90d94203ab13e8836b9599caf8d6aafd1cb","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":61153677,"name":"m3db","full_name":"m3db/m3db","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3db","description":"A distributed time series database using M3TSZ float64 compression ","fork":false,"url":"https://api.github.com/repos/m3db/m3db","forks_url":"https://api.github.com/repos/m3db/m3db/forks","keys_url":"https://api.github.com/repos/m3db/m3db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3db/teams","hooks_url":"https://api.github.com/repos/m3db/m3db/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3db/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3db/events","assignees_url":"https://api.github.com/repos/m3db/m3db/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3db/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3db/tags","blobs_url":"https://api.github.com/repos/m3db/m3db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3db/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3db/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3db/languages","stargazers_url":"https://api.github.com/repos/m3db/m3db/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3db/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3db/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3db/subscription","commits_url":"https://api.github.com/repos/m3db/m3db/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3db/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3db/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3db/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3db/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3db/merges","archive_url":"https://api.github.com/repos/m3db/m3db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3db/downloads","issues_url":"https://api.github.com/repos/m3db/m3db/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3db/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3db/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3db/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3db/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3db/deployments","created_at":"2016-06-14T20:29:45Z","updated_at":"2018-05-01T15:37:55Z","pushed_at":"2018-05-01T16:00:40Z","git_url":"git://github.com/m3db/m3db.git","ssh_url":"git@github.com:m3db/m3db.git","clone_url":"https://github.com/m3db/m3db.git","svn_url":"https://github.com/m3db/m3db","homepage":"http://m3db.github.io/m3db/","size":7039,"stargazers_count":145,"watchers_count":145,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":74,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":10,"open_issues":74,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m3db/m3db/pulls/543"},"html":{"href":"https://github.com/m3db/m3db/pull/543"},"issue":{"href":"https://api.github.com/repos/m3db/m3db/issues/543"},"comments":{"href":"https://api.github.com/repos/m3db/m3db/issues/543/comments"},"review_comments":{"href":"https://api.github.com/repos/m3db/m3db/pulls/543/comments"},"review_comment":{"href":"https://api.github.com/repos/m3db/m3db/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m3db/m3db/pulls/543/commits"},"statuses":{"href":"https://api.github.com/repos/m3db/m3db/statuses/dee5e1bd8b3fde1ca12e9ed26242ed674d1d8611"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"richardartoul"}}