{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/33144967","id":33144967,"diff_hunk":"@@ -941,6 +956,47 @@ public void testNodeNotReachableFromMaster() throws Exception {\n         ensureStableCluster(3);\n     }\n \n+    @Test\n+    public void testIndexImportedFromDataOnlyNodesIfMasterLostDataFolder() throws Exception {\n+        // test for https://github.com/elastic/elasticsearch/issues/8823\n+        configureCluster(2, 1);\n+        String masterNode = internalCluster().startMasterNode(Settings.EMPTY);\n+        internalCluster().startDataOnlyNode(Settings.EMPTY);\n+\n+        ensureStableCluster(2);\n+        assertAcked(prepareCreate(\"index\").setSettings(Settings.builder().put(\"index.number_of_replicas\", 0)));\n+        index(\"index\", \"doc\", \"1\", jsonBuilder().startObject().field(\"text\", \"some text\").endObject());\n+        ensureGreen();\n+\n+        internalCluster().restartRandomNode(new InternalTestCluster.MasterNodePredicate(masterNode), new InternalTestCluster.RestartCallback() {\n+            public boolean clearData(String nodeName) {\n+                return true;\n+            }\n+        });\n+\n+        ensureGreen(\"index\");\n+        assertTrue(client().prepareGet(\"index\", \"doc\", \"1\").get().isExists());\n+    }\n+\n+    // tests if indices are really deleted even if a master transition inbetween\n+    @Ignore(\"https://github.com/elastic/elasticsearch/issues/11665\")\n+    @Test\n+    public void testIndicesDeleted() throws Exception {\n+        configureCluster(3, 2);\n+        String masterNode1 = internalCluster().startMasterNode(Settings.EMPTY);\n+        internalCluster().startMasterNode(Settings.EMPTY);\n+        String dataNode = internalCluster().startDataOnlyNode(Settings.EMPTY);\n+        assertAcked(prepareCreate(\"test\"));\n+        ensureYellow();\n+\n+        NetworkPartition networkPartition = new NetworkUnresponsivePartition(masterNode1, dataNode, getRandom());\n+        internalCluster().setDisruptionScheme(networkPartition);\n+        networkPartition.startDisrupting();\n+        internalCluster().client(masterNode1).admin().indices().prepareDelete(\"test\").setTimeout(\"1s\").get();\n+        internalCluster().restartRandomNode(new InternalTestCluster.MasterNodePredicate(masterNode1), InternalTestCluster.EMPTY_CALLBACK);","path":"core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsTests.java","position":129,"original_position":129,"commit_id":"bc55fbbf244d075419649d380cad1fa8b4afb145","original_commit_id":"bc55fbbf244d075419649d380cad1fa8b4afb145","user":{"login":"bleskes","id":1006375,"avatar_url":"https://avatars.githubusercontent.com/u/1006375?v=3","gravatar_id":"","url":"https://api.github.com/users/bleskes","html_url":"https://github.com/bleskes","followers_url":"https://api.github.com/users/bleskes/followers","following_url":"https://api.github.com/users/bleskes/following{/other_user}","gists_url":"https://api.github.com/users/bleskes/gists{/gist_id}","starred_url":"https://api.github.com/users/bleskes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleskes/subscriptions","organizations_url":"https://api.github.com/users/bleskes/orgs","repos_url":"https://api.github.com/users/bleskes/repos","events_url":"https://api.github.com/users/bleskes/events{/privacy}","received_events_url":"https://api.github.com/users/bleskes/received_events","type":"User","site_admin":false},"body":"you can use internalCluster().stopCurrentMasterNode()","created_at":"2015-06-24T13:08:02Z","updated_at":"2015-06-24T13:08:02Z","html_url":"https://github.com/elastic/elasticsearch/pull/11666#discussion_r33144967","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/33144967"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11666#discussion_r33144967"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666","id":37679450,"html_url":"https://github.com/elastic/elasticsearch/pull/11666","diff_url":"https://github.com/elastic/elasticsearch/pull/11666.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/11666.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11666","number":11666,"state":"open","locked":false,"title":"[TEST] remove redundant tests and move to different suite","user":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=3","gravatar_id":"","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"body":"Some of the test for meta data are redundant. Also, since they\r\nsomewhat test service disruptions (start master with empty\r\ndata folder) we might move them to DiscoveryWithServiceDisruptionsTests.\r\nAlso, this commit adds a test for\r\nhttps://github.com/elastic/elasticsearch/issues/11665","created_at":"2015-06-15T10:53:29Z","updated_at":"2015-06-24T13:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8267852a5013aa5daaac0c4bbd6f206aa0e61192","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11666/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/bc55fbbf244d075419649d380cad1fa8b4afb145","head":{"label":"brwe:meta-data-zen","ref":"meta-data-zen","sha":"bc55fbbf244d075419649d380cad1fa8b4afb145","user":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=3","gravatar_id":"","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"repo":{"id":9810286,"name":"elasticsearch","full_name":"brwe/elasticsearch","owner":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=3","gravatar_id":"","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brwe/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/brwe/elasticsearch","forks_url":"https://api.github.com/repos/brwe/elasticsearch/forks","keys_url":"https://api.github.com/repos/brwe/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brwe/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brwe/elasticsearch/teams","hooks_url":"https://api.github.com/repos/brwe/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/brwe/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/brwe/elasticsearch/events","assignees_url":"https://api.github.com/repos/brwe/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/brwe/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/brwe/elasticsearch/tags","blobs_url":"https://api.github.com/repos/brwe/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brwe/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brwe/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/brwe/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brwe/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/brwe/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/brwe/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/brwe/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/brwe/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/brwe/elasticsearch/subscription","commits_url":"https://api.github.com/repos/brwe/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/brwe/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/brwe/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/brwe/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/brwe/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/brwe/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brwe/elasticsearch/merges","archive_url":"https://api.github.com/repos/brwe/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brwe/elasticsearch/downloads","issues_url":"https://api.github.com/repos/brwe/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/brwe/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/brwe/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/brwe/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brwe/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/brwe/elasticsearch/releases{/id}","created_at":"2013-05-02T09:49:12Z","updated_at":"2014-08-14T12:47:29Z","pushed_at":"2015-06-17T12:52:40Z","git_url":"git://github.com/brwe/elasticsearch.git","ssh_url":"git@github.com:brwe/elasticsearch.git","clone_url":"https://github.com/brwe/elasticsearch.git","svn_url":"https://github.com/brwe/elasticsearch","homepage":"http://elasticsearch.org","size":138635,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"elastic:master","ref":"master","sha":"8dd7dae5b986148be126a336c937e4c29c0bfd49","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-06-24T12:24:16Z","pushed_at":"2015-06-24T12:59:59Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":1896291,"stargazers_count":11740,"watchers_count":11740,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3713,"mirror_url":null,"open_issues_count":1122,"forks":3713,"open_issues":1122,"watchers":11740,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11666"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11666"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11666/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11666/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/bc55fbbf244d075419649d380cad1fa8b4afb145"}}}}