{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10426","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10426/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10426/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10426/events","html_url":"https://github.com/cockroachdb/cockroach/pull/10426","id":186954932,"number":10426,"title":"storage: eager GC for replicas blocking snapshots","user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars.githubusercontent.com/u/6201335?v=3","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-03T00:25:52Z","updated_at":"2016-11-03T12:41:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/10426","html_url":"https://github.com/cockroachdb/cockroach/pull/10426","diff_url":"https://github.com/cockroachdb/cockroach/pull/10426.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/10426.patch"},"body":"Consider the following situation on a Range X:\r\n\r\n- the range lives on nodes 1,2,3\r\n- gets rebalanced to nodes 1,2,4 while node 3 is down\r\n- node 3 restarts, but the (now removed) replica remains\r\n- quiescent\r\n- the range splits\r\n- the right hand side of the split gets rebalanced to\r\n- nodes 1,2,3.\r\n\r\nIn order to receive a snapshot for in the last step, node 3 needs to\r\nhave garbage-collected its old pre-split replica. If it weren't for node\r\n3's downtime this would normally happen eagerly as its peers will inform\r\nit of its fate. In this scenario however, one would have to wait until\r\na) a client request creates the Raft group (which is unlikely as it\r\nisn't being addressed any more) or b) a queue picks it up (which can\r\ntake a long time).\r\n\r\nInstead, when returning an overlap and the overlap appears to be\r\ninactive, we add to the GC queue (which in turn activates the\r\nreplica). For the situation above, we could also hope to only create the\r\nRaft group (as that would likely, but not necessarily, bring it into\r\ncontact with its ex-peers). However, none of the old members may still\r\nbe around in larger clusters, so going for the GC queue directly is the\r\nbetter option.\r\n\r\nCloses #8942\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/10426)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/258131539","html_url":"https://github.com/cockroachdb/cockroach/pull/10426#issuecomment-258131539","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10426","id":258131539,"user":{"login":"tschottdorf","id":5076964,"avatar_url":"https://avatars.githubusercontent.com/u/5076964?v=3","gravatar_id":"","url":"https://api.github.com/users/tschottdorf","html_url":"https://github.com/tschottdorf","followers_url":"https://api.github.com/users/tschottdorf/followers","following_url":"https://api.github.com/users/tschottdorf/following{/other_user}","gists_url":"https://api.github.com/users/tschottdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/tschottdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschottdorf/subscriptions","organizations_url":"https://api.github.com/users/tschottdorf/orgs","repos_url":"https://api.github.com/users/tschottdorf/repos","events_url":"https://api.github.com/users/tschottdorf/events{/privacy}","received_events_url":"https://api.github.com/users/tschottdorf/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T12:41:04Z","updated_at":"2016-11-03T12:41:04Z","body":"\n\n\n\nReviewed 2 of 2 files at r1, 2 of 2 files at r2.\nReview status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks pending.\n\n---\n\n*[pkg/storage/store.go, line 3520 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/10426#-KVc-HITobuINo2SE3Rz:-KVeCAgWXBCQ10hn5MlV:bwvb7ie) ([raw file](https://github.com/cockroachdb/cockroach/blob/6f66401984cb61ce9fd647f98b8f70b65cf86641/pkg/storage/store.go#L3520)):*\n<details><summary><i>Previously, petermattis (Peter Mattis) wrote…</i></summary>\n> As the comment explains, `exReplica` can be `nil` which means we should use `%v`, right?\n</details>\nLooks right to me.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/10426)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"tschottdorf"}}