{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/53023848","id":53023848,"diff_hunk":"@@ -397,13 +369,13 @@ int MonClient::init()\n     return r;\n   }\n \n-  rotating_secrets = new RotatingKeyRing(cct, cct->get_module_type(), keyring);\n+  rotating_secrets.reset(new RotatingKeyRing(\n+\t\t\t   cct, cct->get_module_type(), keyring.get()));\n \n   initialized = true;\n \n-  timer.init();\n   finisher.start();\n-  schedule_tick();\n+  timer.add_event(tick_time(), &MonClient::timer, this);","path":"src/mon/MonClient.cc","position":329,"original_position":329,"commit_id":"8d95a78d7da62f5f0992fe7f616e7a268005921c","original_commit_id":"8d95a78d7da62f5f0992fe7f616e7a268005921c","user":{"login":"cbodley","id":1928002,"avatar_url":"https://avatars.githubusercontent.com/u/1928002?v=3","gravatar_id":"","url":"https://api.github.com/users/cbodley","html_url":"https://github.com/cbodley","followers_url":"https://api.github.com/users/cbodley/followers","following_url":"https://api.github.com/users/cbodley/following{/other_user}","gists_url":"https://api.github.com/users/cbodley/gists{/gist_id}","starred_url":"https://api.github.com/users/cbodley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbodley/subscriptions","organizations_url":"https://api.github.com/users/cbodley/orgs","repos_url":"https://api.github.com/users/cbodley/repos","events_url":"https://api.github.com/users/cbodley/events{/privacy}","received_events_url":"https://api.github.com/users/cbodley/received_events","type":"User","site_admin":false},"body":"SafeTimer doesn't spawn a thread until `init()`, so this timer should probably start suspended as well.","created_at":"2016-02-16T15:18:11Z","updated_at":"2016-02-16T15:18:11Z","html_url":"https://github.com/ceph/ceph/pull/7657#discussion_r53023848","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/7657","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/53023848"},"html":{"href":"https://github.com/ceph/ceph/pull/7657#discussion_r53023848"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/7657"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/7657","id":59426854,"html_url":"https://github.com/ceph/ceph/pull/7657","diff_url":"https://github.com/ceph/ceph/pull/7657.diff","patch_url":"https://github.com/ceph/ceph/pull/7657.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/7657","number":7657,"state":"open","locked":false,"title":"Destroy Context* throughout MonClient. Also do other things.","user":{"login":"adamemerson","id":458092,"avatar_url":"https://avatars.githubusercontent.com/u/458092?v=3","gravatar_id":"","url":"https://api.github.com/users/adamemerson","html_url":"https://github.com/adamemerson","followers_url":"https://api.github.com/users/adamemerson/followers","following_url":"https://api.github.com/users/adamemerson/following{/other_user}","gists_url":"https://api.github.com/users/adamemerson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamemerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamemerson/subscriptions","organizations_url":"https://api.github.com/users/adamemerson/orgs","repos_url":"https://api.github.com/users/adamemerson/repos","events_url":"https://api.github.com/users/adamemerson/events{/privacy}","received_events_url":"https://api.github.com/users/adamemerson/received_events","type":"User","site_admin":false},"body":"Also included is making everything more RAIIful, using an intrusive map in one place, and other general cleanups.","created_at":"2016-02-15T23:52:17Z","updated_at":"2016-02-16T15:18:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8855b10a7eae98aca30550a4d362d7312ef8a819","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/7657/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/7657/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/7657/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/8d95a78d7da62f5f0992fe7f616e7a268005921c","head":{"label":"adamemerson:wip-decontextualize-monclient","ref":"wip-decontextualize-monclient","sha":"8d95a78d7da62f5f0992fe7f616e7a268005921c","user":{"login":"adamemerson","id":458092,"avatar_url":"https://avatars.githubusercontent.com/u/458092?v=3","gravatar_id":"","url":"https://api.github.com/users/adamemerson","html_url":"https://github.com/adamemerson","followers_url":"https://api.github.com/users/adamemerson/followers","following_url":"https://api.github.com/users/adamemerson/following{/other_user}","gists_url":"https://api.github.com/users/adamemerson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamemerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamemerson/subscriptions","organizations_url":"https://api.github.com/users/adamemerson/orgs","repos_url":"https://api.github.com/users/adamemerson/repos","events_url":"https://api.github.com/users/adamemerson/events{/privacy}","received_events_url":"https://api.github.com/users/adamemerson/received_events","type":"User","site_admin":false},"repo":{"id":50194456,"name":"ceph","full_name":"adamemerson/ceph","owner":{"login":"adamemerson","id":458092,"avatar_url":"https://avatars.githubusercontent.com/u/458092?v=3","gravatar_id":"","url":"https://api.github.com/users/adamemerson","html_url":"https://github.com/adamemerson","followers_url":"https://api.github.com/users/adamemerson/followers","following_url":"https://api.github.com/users/adamemerson/following{/other_user}","gists_url":"https://api.github.com/users/adamemerson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamemerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamemerson/subscriptions","organizations_url":"https://api.github.com/users/adamemerson/orgs","repos_url":"https://api.github.com/users/adamemerson/repos","events_url":"https://api.github.com/users/adamemerson/events{/privacy}","received_events_url":"https://api.github.com/users/adamemerson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamemerson/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/adamemerson/ceph","forks_url":"https://api.github.com/repos/adamemerson/ceph/forks","keys_url":"https://api.github.com/repos/adamemerson/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamemerson/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamemerson/ceph/teams","hooks_url":"https://api.github.com/repos/adamemerson/ceph/hooks","issue_events_url":"https://api.github.com/repos/adamemerson/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/adamemerson/ceph/events","assignees_url":"https://api.github.com/repos/adamemerson/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/adamemerson/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/adamemerson/ceph/tags","blobs_url":"https://api.github.com/repos/adamemerson/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamemerson/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamemerson/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamemerson/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamemerson/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/adamemerson/ceph/languages","stargazers_url":"https://api.github.com/repos/adamemerson/ceph/stargazers","contributors_url":"https://api.github.com/repos/adamemerson/ceph/contributors","subscribers_url":"https://api.github.com/repos/adamemerson/ceph/subscribers","subscription_url":"https://api.github.com/repos/adamemerson/ceph/subscription","commits_url":"https://api.github.com/repos/adamemerson/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamemerson/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamemerson/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamemerson/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamemerson/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/adamemerson/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamemerson/ceph/merges","archive_url":"https://api.github.com/repos/adamemerson/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamemerson/ceph/downloads","issues_url":"https://api.github.com/repos/adamemerson/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/adamemerson/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/adamemerson/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/adamemerson/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamemerson/ceph/labels{/name}","releases_url":"https://api.github.com/repos/adamemerson/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/adamemerson/ceph/deployments","created_at":"2016-01-22T16:51:04Z","updated_at":"2016-01-22T16:51:21Z","pushed_at":"2016-02-15T23:50:25Z","git_url":"git://github.com/adamemerson/ceph.git","ssh_url":"git@github.com:adamemerson/ceph.git","clone_url":"https://github.com/adamemerson/ceph.git","svn_url":"https://github.com/adamemerson/ceph","homepage":"http://ceph.com","size":144324,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"9d3e6dcb26a77846f6a7e281c60432328ce1f7d9","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2016-02-16T11:41:40Z","pushed_at":"2016-02-16T15:02:07Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":184282,"stargazers_count":1874,"watchers_count":1874,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1133,"mirror_url":null,"open_issues_count":218,"forks":1133,"open_issues":218,"watchers":1874,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/7657"},"html":{"href":"https://github.com/ceph/ceph/pull/7657"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/7657"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/7657/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/7657/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/7657/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/8d95a78d7da62f5f0992fe7f616e7a268005921c"}}}}