{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9299","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9299/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9299/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9299/events","html_url":"https://github.com/cockroachdb/cockroach/pull/9299","id":176452615,"number":9299,"title":"storage: concurrent destruction of replica data","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":1,"created_at":"2016-09-12T18:44:54Z","updated_at":"2016-09-12T18:46:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/9299","html_url":"https://github.com/cockroachdb/cockroach/pull/9299","diff_url":"https://github.com/cockroachdb/cockroach/pull/9299.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/9299.patch"},"body":"Previously, replicas were marked as destroyed on their on disk data\ndeleted while holding Store.mu. This acted as a concurrency bottleneck\nand also locked out other replica processing. With placeholders and the\nper-Replica raft locks, holding Store.mu is no longer necessary to\ndestroy a replica.\n\nFixes #9244.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/9299)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/246450236","html_url":"https://github.com/cockroachdb/cockroach/pull/9299#issuecomment-246450236","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9299","id":246450236,"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},"created_at":"2016-09-12T18:46:52Z","updated_at":"2016-09-12T18:46:52Z","body":"\n\n\n\nReview status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending.\n\n---\n\n*[storage/replica.go, line 581 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/9299#-KRUi8zTH0BlyBKlEUo4:-KRUi8zTH0BlyBKlEUo5:bhp3ypx) ([raw file](https://github.com/cockroachdb/cockroach/blob/8a7185a856d3fecebdab17e4774d1b706c5c96d0/storage/replica.go#L581)):*\n> ```Go\n> // destroyData deletes all data associated with a replica, leaving a\n> // tombstone. Requires that Replica.raftMu is held.\n> func (r *Replica) destroyData(desc *roachpb.RangeDescriptor) error {\n> ```\n\nThis is pure code movement from `Store.destroyReplicaData`. That method only had a single caller and we always had the replica. Moved to make the locking requirement (holding `Replica.raftMu`) more obvious.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/9299)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"petermattis"}}