{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/87773218","pull_request_review_id":8370926,"id":87773218,"diff_hunk":"@@ -777,6 +808,10 @@ public int nodeAndClientId() {\n             return nodeAndClientId;\n         }\n \n+        public boolean isMasterNode() {","path":"test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java","position":218,"original_position":161,"commit_id":"b0c4ff1099b54711d706b8f3a8079b9ace705c6a","original_commit_id":"4670dc6e3e4f34828e4928c9e0ae57592390e5da","user":{"login":"javanna","id":832460,"avatar_url":"https://avatars.githubusercontent.com/u/832460?v=3","gravatar_id":"","url":"https://api.github.com/users/javanna","html_url":"https://github.com/javanna","followers_url":"https://api.github.com/users/javanna/followers","following_url":"https://api.github.com/users/javanna/following{/other_user}","gists_url":"https://api.github.com/users/javanna/gists{/gist_id}","starred_url":"https://api.github.com/users/javanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javanna/subscriptions","organizations_url":"https://api.github.com/users/javanna/orgs","repos_url":"https://api.github.com/users/javanna/repos","events_url":"https://api.github.com/users/javanna/events{/privacy}","received_events_url":"https://api.github.com/users/javanna/received_events","type":"User","site_admin":false},"body":"I know I know. I just thought that it would add clarity though, cause is MasterNode is really ambiguous. I don't think it breaks any convention if we use the right terminology when adding new methods, especially in test code.","created_at":"2016-11-14T10:29:24Z","updated_at":"2016-11-14T10:29:25Z","html_url":"https://github.com/elastic/elasticsearch/pull/21458#discussion_r87773218","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/87773218"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/21458#discussion_r87773218"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458","id":93122956,"html_url":"https://github.com/elastic/elasticsearch/pull/21458","diff_url":"https://github.com/elastic/elasticsearch/pull/21458.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/21458.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21458","number":21458,"state":"open","locked":false,"title":"Adapt InternalTestCluster to auto adjust `minimum_master_nodes`","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":"#20960 removed `LocalDiscovery` and we now use `ZenDiscovery` in all our tests. To keep cluster forming fast, we are using a `MockZenPing` implementation which uses static maps to return instant results making master election fast. Currently, we don't set `minimum_master_nodes` causing the occasional split brain when starting multiple nodes concurrently and their pinging is so fast that it misses the fact that one of the node has elected it self master. To solve this, `InternalTestCluster` is modified to behave like a true cluster and manage and set `minimum_master_nodes` correctly with every change to the number of nodes.\r\n\r\nTests that want to manage the settings themselves can opt out using a new `autoMinMasterNodes` parameter to the `ClusterScope` annotation. \r\n\r\nHaving `min_master_nodes` set means the started node may need to wait for other nodes to be started as well. To combat this, we set `discovery.initial_state_timeout` to `0` and wait for the cluster to form once all node have been started.\r\n\r\nWith this change in place, I think we can/should do a couple of follow ups:\r\n1) Remove async node starts. Now we can just start the nodes one by one (using `initial_state_timeout=0`) and wait for them to join at the end. This will simplify things.\r\n2) ~~`MockZenPing` makes pinging fast. If a node waits on other nodes to be started, it can busy-ping generating lots of logs. I have some ideas of how to tackle that but I hope that removing async  multi node starting (meaning we can reduce the time a node waits by first creating all of them and then starting them)  will be enough to not require this.~~. This is addressed by this PR as well.","created_at":"2016-11-10T10:23:05Z","updated_at":"2016-11-14T10:29:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cc4bbf2d7087b6c4dfd5865ea2399f8bf72ca37","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21458/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/b0c4ff1099b54711d706b8f3a8079b9ace705c6a","head":{"label":"bleskes:test_cluster_min_master","ref":"test_cluster_min_master","sha":"b0c4ff1099b54711d706b8f3a8079b9ace705c6a","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},"repo":{"id":9219509,"name":"elasticsearch","full_name":"bleskes/elasticsearch","owner":{"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},"private":false,"html_url":"https://github.com/bleskes/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/bleskes/elasticsearch","forks_url":"https://api.github.com/repos/bleskes/elasticsearch/forks","keys_url":"https://api.github.com/repos/bleskes/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bleskes/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bleskes/elasticsearch/teams","hooks_url":"https://api.github.com/repos/bleskes/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/bleskes/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/bleskes/elasticsearch/events","assignees_url":"https://api.github.com/repos/bleskes/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/bleskes/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/bleskes/elasticsearch/tags","blobs_url":"https://api.github.com/repos/bleskes/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bleskes/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bleskes/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/bleskes/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bleskes/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/bleskes/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/bleskes/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/bleskes/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/bleskes/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/bleskes/elasticsearch/subscription","commits_url":"https://api.github.com/repos/bleskes/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/bleskes/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/bleskes/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/bleskes/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/bleskes/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/bleskes/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bleskes/elasticsearch/merges","archive_url":"https://api.github.com/repos/bleskes/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bleskes/elasticsearch/downloads","issues_url":"https://api.github.com/repos/bleskes/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/bleskes/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/bleskes/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/bleskes/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bleskes/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/bleskes/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/bleskes/elasticsearch/deployments","created_at":"2013-04-04T14:06:17Z","updated_at":"2015-04-24T10:42:15Z","pushed_at":"2016-11-13T22:09:22Z","git_url":"git://github.com/bleskes/elasticsearch.git","ssh_url":"git@github.com:bleskes/elasticsearch.git","clone_url":"https://github.com/bleskes/elasticsearch.git","svn_url":"https://github.com/bleskes/elasticsearch","homepage":"http://elasticsearch.org","size":249126,"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":"2a328034ef722b5f359caeeafbb33715098635d0","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}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2016-11-14T10:01:00Z","pushed_at":"2016-11-14T10:07:56Z","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":372406,"stargazers_count":19312,"watchers_count":19312,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6611,"mirror_url":null,"open_issues_count":1181,"forks":6611,"open_issues":1181,"watchers":19312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/21458"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/21458"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/21458/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21458/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/b0c4ff1099b54711d706b8f3a8079b9ace705c6a"}}}}
{"actor":{"display_login":"javanna"}}