{"action":"created","issue":{"url":"https://api.github.com/repos/tikv/tikv/issues/3769","repository_url":"https://api.github.com/repos/tikv/tikv","labels_url":"https://api.github.com/repos/tikv/tikv/issues/3769/labels{/name}","comments_url":"https://api.github.com/repos/tikv/tikv/issues/3769/comments","events_url":"https://api.github.com/repos/tikv/tikv/issues/3769/events","html_url":"https://github.com/tikv/tikv/pull/3769","id":379098610,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NjQ0MjY0","number":3769,"title":"Remove `Storage::start()` and `Storage::stop()`","user":{"login":"breeswish","id":1916485,"node_id":"MDQ6VXNlcjE5MTY0ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/1916485?v=4","gravatar_id":"","url":"https://api.github.com/users/breeswish","html_url":"https://github.com/breeswish","followers_url":"https://api.github.com/users/breeswish/followers","following_url":"https://api.github.com/users/breeswish/following{/other_user}","gists_url":"https://api.github.com/users/breeswish/gists{/gist_id}","starred_url":"https://api.github.com/users/breeswish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breeswish/subscriptions","organizations_url":"https://api.github.com/users/breeswish/orgs","repos_url":"https://api.github.com/users/breeswish/repos","events_url":"https://api.github.com/users/breeswish/events{/privacy}","received_events_url":"https://api.github.com/users/breeswish/received_events","type":"User","site_admin":false},"labels":[{"id":539777079,"node_id":"MDU6TGFiZWw1Mzk3NzcwNzk=","url":"https://api.github.com/repos/tikv/tikv/labels/C:%20Storage","name":"C: Storage","color":"d1fad7","default":false},{"id":1015578892,"node_id":"MDU6TGFiZWwxMDE1NTc4ODky","url":"https://api.github.com/repos/tikv/tikv/labels/S:%20LGT1","name":"S: LGT1","color":"66d7ee","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-09T10:07:31Z","updated_at":"2018-11-14T11:52:42Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/tikv/tikv/pulls/3769","html_url":"https://github.com/tikv/tikv/pull/3769","diff_url":"https://github.com/tikv/tikv/pull/3769.diff","patch_url":"https://github.com/tikv/tikv/pull/3769.patch"},"body":"<!--\r\nThank you for contributing to TiKV! Please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.\r\n-->\r\n\r\n## What have you changed? (mandatory)\r\n\r\nUse lifetime to manage the start and the stop of `Storage`. Storage will be always stopped once it is destroyed and will be always started once it is created.\r\n\r\nResolve https://github.com/tikv/tikv/issues/3759\r\nResolve https://github.com/tikv/tikv/issues/3756\r\n\r\nSeveral benefits:\r\n- No undefined behaviour any more caused by double `start()` or double `stop()` or `stop()` before `start()` or `start()` after `stop()`.\r\n- Resource will be never leaked if `stop()` is not called.\r\n\r\nAfter this PR, there will be **no** remaining garbage test directories in temp dir.\r\n\r\nThis PR also fixes https://github.com/tikv/tikv/issues/3767 by adding `worker.stop()`. However the best solution is fixing https://github.com/tikv/tikv/issues/3768 like what we do in this PR .\r\n\r\n## What are the type of the changes? (mandatory)\r\n\r\n- Improvement (non-breaking change which is an improvement to an existing feature)\r\n\r\n## How has this PR been tested? (mandatory)\r\n\r\nCI\r\n"},"comment":{"url":"https://api.github.com/repos/tikv/tikv/issues/comments/438636579","html_url":"https://github.com/tikv/tikv/pull/3769#issuecomment-438636579","issue_url":"https://api.github.com/repos/tikv/tikv/issues/3769","id":438636579,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODYzNjU3OQ==","user":{"login":"breeswish","id":1916485,"node_id":"MDQ6VXNlcjE5MTY0ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/1916485?v=4","gravatar_id":"","url":"https://api.github.com/users/breeswish","html_url":"https://github.com/breeswish","followers_url":"https://api.github.com/users/breeswish/followers","following_url":"https://api.github.com/users/breeswish/following{/other_user}","gists_url":"https://api.github.com/users/breeswish/gists{/gist_id}","starred_url":"https://api.github.com/users/breeswish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breeswish/subscriptions","organizations_url":"https://api.github.com/users/breeswish/orgs","repos_url":"https://api.github.com/users/breeswish/repos","events_url":"https://api.github.com/users/breeswish/events{/privacy}","received_events_url":"https://api.github.com/users/breeswish/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T11:52:42Z","updated_at":"2018-11-14T11:52:42Z","author_association":"MEMBER","body":"@MyonKeminta PTAL, thanks a lot!"}}
{"actor":{"display_login":"breeswish"}}