{"action":"created","comment":{"url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/comments/86465442","pull_request_review_id":7119219,"id":86465442,"diff_hunk":"@@ -0,0 +1,35 @@\n+package org.corfudb.infrastructure;\n+\n+import org.junit.Test;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+\n+/**\n+ * Checks the various services and messages handled by the\n+ * Management Server.\n+ * <p>\n+ * Created by zlokhandwala on 11/2/16.\n+ */\n+public class ManagementServerTest extends AbstractServerTest {\n+\n+    @Override\n+    public ManagementServer getDefaultServer() {\n+        ServerContext serverContext = new ServerContextBuilder()\n+                .setSingle(false)\n+                .setServerRouter(getRouter())\n+                .build();\n+        return new ManagementServer(serverContext, new LayoutServer(serverContext));\n+    }\n+\n+    /**\n+     * Testing the status of the failure detector and shutdown functionality.\n+     */\n+    @Test\n+    public void checkFailureDetectorStatus() {","path":"src/test/java/org/corfudb/infrastructure/ManagementServerTest.java","position":28,"original_position":28,"commit_id":"6e605a0808f058efeb10ea59f15db5a95691f95c","original_commit_id":"6e605a0808f058efeb10ea59f15db5a95691f95c","user":{"login":"Maithem","id":7818642,"avatar_url":"https://avatars.githubusercontent.com/u/7818642?v=3","gravatar_id":"","url":"https://api.github.com/users/Maithem","html_url":"https://github.com/Maithem","followers_url":"https://api.github.com/users/Maithem/followers","following_url":"https://api.github.com/users/Maithem/following{/other_user}","gists_url":"https://api.github.com/users/Maithem/gists{/gist_id}","starred_url":"https://api.github.com/users/Maithem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maithem/subscriptions","organizations_url":"https://api.github.com/users/Maithem/orgs","repos_url":"https://api.github.com/users/Maithem/repos","events_url":"https://api.github.com/users/Maithem/events{/privacy}","received_events_url":"https://api.github.com/users/Maithem/received_events","type":"User","site_admin":false},"body":"I don't see how this test is effective. The isShutdown flag is switched right after the method invocation, so essentially this test only verifies that the constructor and shutdown method have been called, nothing more. It also doesnt test the side effects of the shutdown and start operation.","created_at":"2016-11-03T23:32:29Z","updated_at":"2016-11-03T23:50:27Z","html_url":"https://github.com/CorfuDB/CorfuDB/pull/261#discussion_r86465442","pull_request_url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/comments/86465442"},"html":{"href":"https://github.com/CorfuDB/CorfuDB/pull/261#discussion_r86465442"},"pull_request":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261","id":91712011,"html_url":"https://github.com/CorfuDB/CorfuDB/pull/261","diff_url":"https://github.com/CorfuDB/CorfuDB/pull/261.diff","patch_url":"https://github.com/CorfuDB/CorfuDB/pull/261.patch","issue_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/261","number":261,"state":"open","locked":false,"title":"Introducing Management Server","user":{"login":"zalokhan","id":10751367,"avatar_url":"https://avatars.githubusercontent.com/u/10751367?v=3","gravatar_id":"","url":"https://api.github.com/users/zalokhan","html_url":"https://github.com/zalokhan","followers_url":"https://api.github.com/users/zalokhan/followers","following_url":"https://api.github.com/users/zalokhan/following{/other_user}","gists_url":"https://api.github.com/users/zalokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/zalokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalokhan/subscriptions","organizations_url":"https://api.github.com/users/zalokhan/orgs","repos_url":"https://api.github.com/users/zalokhan/repos","events_url":"https://api.github.com/users/zalokhan/events{/privacy}","received_events_url":"https://api.github.com/users/zalokhan/received_events","type":"User","site_admin":false},"body":"### Management Server\r\nManagement server takes the serverContext and the layoutServer as parameters.\r\nThe layoutServer is used only initially to get the bootstrapping layout.\r\n\r\nThe server spawns a thread to run the fault detection as an async task.\r\n(As pointed out by @Maithem this can be inefficient as there can be several threads running if we have 1000s of corfu servers on one node. So let me know if there is a better way to do this.)\r\n\r\nThe getRuntime method in the Management Server returns a connected instance of the corfuRuntime. It returns null if the server has been signaled to shutdown.\r\n\r\n### Minor change in CorfuRuntime\r\nI have added a field isShutdown in the corfu runtime to prevent it from going into an endless loop situation. (Especially when running tests.)\r\nThe invalidate corfuRuntime causes it to get stuck in the loop trying to fetch a layout even if all the layout servers have gone down.\r\nThus I've added the flag to break out of this.\r\nThis flag is checked only when the thread is interrupted. Else we avoid repetitive checks.\r\n\r\n### Addition in CorfuServer\r\nInitializing and starting the Management Server.","created_at":"2016-10-31T23:47:59Z","updated_at":"2016-11-03T23:50:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a7b8bffe1454c23c98a4529589bf50b7e02d655","assignee":{"login":"zalokhan","id":10751367,"avatar_url":"https://avatars.githubusercontent.com/u/10751367?v=3","gravatar_id":"","url":"https://api.github.com/users/zalokhan","html_url":"https://github.com/zalokhan","followers_url":"https://api.github.com/users/zalokhan/followers","following_url":"https://api.github.com/users/zalokhan/following{/other_user}","gists_url":"https://api.github.com/users/zalokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/zalokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalokhan/subscriptions","organizations_url":"https://api.github.com/users/zalokhan/orgs","repos_url":"https://api.github.com/users/zalokhan/repos","events_url":"https://api.github.com/users/zalokhan/events{/privacy}","received_events_url":"https://api.github.com/users/zalokhan/received_events","type":"User","site_admin":false},"assignees":[{"login":"zalokhan","id":10751367,"avatar_url":"https://avatars.githubusercontent.com/u/10751367?v=3","gravatar_id":"","url":"https://api.github.com/users/zalokhan","html_url":"https://github.com/zalokhan","followers_url":"https://api.github.com/users/zalokhan/followers","following_url":"https://api.github.com/users/zalokhan/following{/other_user}","gists_url":"https://api.github.com/users/zalokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/zalokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalokhan/subscriptions","organizations_url":"https://api.github.com/users/zalokhan/orgs","repos_url":"https://api.github.com/users/zalokhan/repos","events_url":"https://api.github.com/users/zalokhan/events{/privacy}","received_events_url":"https://api.github.com/users/zalokhan/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/CorfuDB/CorfuDB/milestones/1","html_url":"https://github.com/CorfuDB/CorfuDB/milestones/v1.0%20Release","labels_url":"https://api.github.com/repos/CorfuDB/CorfuDB/milestones/1/labels","id":2048118,"number":1,"title":"v1.0 Release","description":"This is the feature complete milestone for version 1.0.\r\n\r\n1.       Check pointing / disaster recovery\r\n2.       Security for Corfu (> TLS 1.1 and AAA)\r\n3.       Runtime Metrics/Stats\r\n4.       Corfu command line interface\r\n5.       Range indexes \r\n6.       Failure Detector\r\n7.       Lifecycle Management\r\n8.       Data checksum","creator":{"login":"no2chem","id":6496984,"avatar_url":"https://avatars.githubusercontent.com/u/6496984?v=3","gravatar_id":"","url":"https://api.github.com/users/no2chem","html_url":"https://github.com/no2chem","followers_url":"https://api.github.com/users/no2chem/followers","following_url":"https://api.github.com/users/no2chem/following{/other_user}","gists_url":"https://api.github.com/users/no2chem/gists{/gist_id}","starred_url":"https://api.github.com/users/no2chem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no2chem/subscriptions","organizations_url":"https://api.github.com/users/no2chem/orgs","repos_url":"https://api.github.com/users/no2chem/repos","events_url":"https://api.github.com/users/no2chem/events{/privacy}","received_events_url":"https://api.github.com/users/no2chem/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":10,"state":"open","created_at":"2016-10-04T22:17:52Z","updated_at":"2016-11-03T09:48:34Z","due_on":"2017-01-31T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261/commits","review_comments_url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261/comments","review_comment_url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/261/comments","statuses_url":"https://api.github.com/repos/CorfuDB/CorfuDB/statuses/6e605a0808f058efeb10ea59f15db5a95691f95c","head":{"label":"zalokhan:failureDetector/managementServer","ref":"failureDetector/managementServer","sha":"6e605a0808f058efeb10ea59f15db5a95691f95c","user":{"login":"zalokhan","id":10751367,"avatar_url":"https://avatars.githubusercontent.com/u/10751367?v=3","gravatar_id":"","url":"https://api.github.com/users/zalokhan","html_url":"https://github.com/zalokhan","followers_url":"https://api.github.com/users/zalokhan/followers","following_url":"https://api.github.com/users/zalokhan/following{/other_user}","gists_url":"https://api.github.com/users/zalokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/zalokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalokhan/subscriptions","organizations_url":"https://api.github.com/users/zalokhan/orgs","repos_url":"https://api.github.com/users/zalokhan/repos","events_url":"https://api.github.com/users/zalokhan/events{/privacy}","received_events_url":"https://api.github.com/users/zalokhan/received_events","type":"User","site_admin":false},"repo":{"id":66982229,"name":"CorfuDB","full_name":"zalokhan/CorfuDB","owner":{"login":"zalokhan","id":10751367,"avatar_url":"https://avatars.githubusercontent.com/u/10751367?v=3","gravatar_id":"","url":"https://api.github.com/users/zalokhan","html_url":"https://github.com/zalokhan","followers_url":"https://api.github.com/users/zalokhan/followers","following_url":"https://api.github.com/users/zalokhan/following{/other_user}","gists_url":"https://api.github.com/users/zalokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/zalokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalokhan/subscriptions","organizations_url":"https://api.github.com/users/zalokhan/orgs","repos_url":"https://api.github.com/users/zalokhan/repos","events_url":"https://api.github.com/users/zalokhan/events{/privacy}","received_events_url":"https://api.github.com/users/zalokhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zalokhan/CorfuDB","description":"A cluster consistency platform","fork":true,"url":"https://api.github.com/repos/zalokhan/CorfuDB","forks_url":"https://api.github.com/repos/zalokhan/CorfuDB/forks","keys_url":"https://api.github.com/repos/zalokhan/CorfuDB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalokhan/CorfuDB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalokhan/CorfuDB/teams","hooks_url":"https://api.github.com/repos/zalokhan/CorfuDB/hooks","issue_events_url":"https://api.github.com/repos/zalokhan/CorfuDB/issues/events{/number}","events_url":"https://api.github.com/repos/zalokhan/CorfuDB/events","assignees_url":"https://api.github.com/repos/zalokhan/CorfuDB/assignees{/user}","branches_url":"https://api.github.com/repos/zalokhan/CorfuDB/branches{/branch}","tags_url":"https://api.github.com/repos/zalokhan/CorfuDB/tags","blobs_url":"https://api.github.com/repos/zalokhan/CorfuDB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalokhan/CorfuDB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalokhan/CorfuDB/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalokhan/CorfuDB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalokhan/CorfuDB/statuses/{sha}","languages_url":"https://api.github.com/repos/zalokhan/CorfuDB/languages","stargazers_url":"https://api.github.com/repos/zalokhan/CorfuDB/stargazers","contributors_url":"https://api.github.com/repos/zalokhan/CorfuDB/contributors","subscribers_url":"https://api.github.com/repos/zalokhan/CorfuDB/subscribers","subscription_url":"https://api.github.com/repos/zalokhan/CorfuDB/subscription","commits_url":"https://api.github.com/repos/zalokhan/CorfuDB/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalokhan/CorfuDB/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalokhan/CorfuDB/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalokhan/CorfuDB/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalokhan/CorfuDB/contents/{+path}","compare_url":"https://api.github.com/repos/zalokhan/CorfuDB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalokhan/CorfuDB/merges","archive_url":"https://api.github.com/repos/zalokhan/CorfuDB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalokhan/CorfuDB/downloads","issues_url":"https://api.github.com/repos/zalokhan/CorfuDB/issues{/number}","pulls_url":"https://api.github.com/repos/zalokhan/CorfuDB/pulls{/number}","milestones_url":"https://api.github.com/repos/zalokhan/CorfuDB/milestones{/number}","notifications_url":"https://api.github.com/repos/zalokhan/CorfuDB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalokhan/CorfuDB/labels{/name}","releases_url":"https://api.github.com/repos/zalokhan/CorfuDB/releases{/id}","deployments_url":"https://api.github.com/repos/zalokhan/CorfuDB/deployments","created_at":"2016-08-30T22:27:02Z","updated_at":"2016-08-30T22:27:04Z","pushed_at":"2016-11-03T21:16:32Z","git_url":"git://github.com/zalokhan/CorfuDB.git","ssh_url":"git@github.com:zalokhan/CorfuDB.git","clone_url":"https://github.com/zalokhan/CorfuDB.git","svn_url":"https://github.com/zalokhan/CorfuDB","homepage":"","size":1793737,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"CorfuDB:master","ref":"master","sha":"82363d71015738bd3b51106e2f4dff1430452304","user":{"login":"CorfuDB","id":10199273,"avatar_url":"https://avatars.githubusercontent.com/u/10199273?v=3","gravatar_id":"","url":"https://api.github.com/users/CorfuDB","html_url":"https://github.com/CorfuDB","followers_url":"https://api.github.com/users/CorfuDB/followers","following_url":"https://api.github.com/users/CorfuDB/following{/other_user}","gists_url":"https://api.github.com/users/CorfuDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CorfuDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorfuDB/subscriptions","organizations_url":"https://api.github.com/users/CorfuDB/orgs","repos_url":"https://api.github.com/users/CorfuDB/repos","events_url":"https://api.github.com/users/CorfuDB/events{/privacy}","received_events_url":"https://api.github.com/users/CorfuDB/received_events","type":"Organization","site_admin":false},"repo":{"id":12960439,"name":"CorfuDB","full_name":"CorfuDB/CorfuDB","owner":{"login":"CorfuDB","id":10199273,"avatar_url":"https://avatars.githubusercontent.com/u/10199273?v=3","gravatar_id":"","url":"https://api.github.com/users/CorfuDB","html_url":"https://github.com/CorfuDB","followers_url":"https://api.github.com/users/CorfuDB/followers","following_url":"https://api.github.com/users/CorfuDB/following{/other_user}","gists_url":"https://api.github.com/users/CorfuDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CorfuDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorfuDB/subscriptions","organizations_url":"https://api.github.com/users/CorfuDB/orgs","repos_url":"https://api.github.com/users/CorfuDB/repos","events_url":"https://api.github.com/users/CorfuDB/events{/privacy}","received_events_url":"https://api.github.com/users/CorfuDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CorfuDB/CorfuDB","description":"A cluster consistency platform","fork":false,"url":"https://api.github.com/repos/CorfuDB/CorfuDB","forks_url":"https://api.github.com/repos/CorfuDB/CorfuDB/forks","keys_url":"https://api.github.com/repos/CorfuDB/CorfuDB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CorfuDB/CorfuDB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CorfuDB/CorfuDB/teams","hooks_url":"https://api.github.com/repos/CorfuDB/CorfuDB/hooks","issue_events_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/events{/number}","events_url":"https://api.github.com/repos/CorfuDB/CorfuDB/events","assignees_url":"https://api.github.com/repos/CorfuDB/CorfuDB/assignees{/user}","branches_url":"https://api.github.com/repos/CorfuDB/CorfuDB/branches{/branch}","tags_url":"https://api.github.com/repos/CorfuDB/CorfuDB/tags","blobs_url":"https://api.github.com/repos/CorfuDB/CorfuDB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CorfuDB/CorfuDB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CorfuDB/CorfuDB/git/refs{/sha}","trees_url":"https://api.github.com/repos/CorfuDB/CorfuDB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CorfuDB/CorfuDB/statuses/{sha}","languages_url":"https://api.github.com/repos/CorfuDB/CorfuDB/languages","stargazers_url":"https://api.github.com/repos/CorfuDB/CorfuDB/stargazers","contributors_url":"https://api.github.com/repos/CorfuDB/CorfuDB/contributors","subscribers_url":"https://api.github.com/repos/CorfuDB/CorfuDB/subscribers","subscription_url":"https://api.github.com/repos/CorfuDB/CorfuDB/subscription","commits_url":"https://api.github.com/repos/CorfuDB/CorfuDB/commits{/sha}","git_commits_url":"https://api.github.com/repos/CorfuDB/CorfuDB/git/commits{/sha}","comments_url":"https://api.github.com/repos/CorfuDB/CorfuDB/comments{/number}","issue_comment_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/comments{/number}","contents_url":"https://api.github.com/repos/CorfuDB/CorfuDB/contents/{+path}","compare_url":"https://api.github.com/repos/CorfuDB/CorfuDB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CorfuDB/CorfuDB/merges","archive_url":"https://api.github.com/repos/CorfuDB/CorfuDB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CorfuDB/CorfuDB/downloads","issues_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues{/number}","pulls_url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls{/number}","milestones_url":"https://api.github.com/repos/CorfuDB/CorfuDB/milestones{/number}","notifications_url":"https://api.github.com/repos/CorfuDB/CorfuDB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CorfuDB/CorfuDB/labels{/name}","releases_url":"https://api.github.com/repos/CorfuDB/CorfuDB/releases{/id}","deployments_url":"https://api.github.com/repos/CorfuDB/CorfuDB/deployments","created_at":"2013-09-19T22:02:36Z","updated_at":"2016-11-03T01:52:59Z","pushed_at":"2016-11-03T21:16:33Z","git_url":"git://github.com/CorfuDB/CorfuDB.git","ssh_url":"git@github.com:CorfuDB/CorfuDB.git","clone_url":"https://github.com/CorfuDB/CorfuDB.git","svn_url":"https://github.com/CorfuDB/CorfuDB","homepage":"","size":1997958,"stargazers_count":95,"watchers_count":95,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":24,"mirror_url":null,"open_issues_count":53,"forks":24,"open_issues":53,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261"},"html":{"href":"https://github.com/CorfuDB/CorfuDB/pull/261"},"issue":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/261"},"comments":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/CorfuDB/CorfuDB/statuses/6e605a0808f058efeb10ea59f15db5a95691f95c"}}}}
{"actor":{"display_login":"Maithem"}}