{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/65177002","id":65177002,"diff_hunk":"@@ -119,6 +115,11 @@ void update(ShardRouting oldShard, ShardRouting newShard) {\n         assert previousValue == oldShard : \"expected shard \" + previousValue + \" but was \" + oldShard;\n     }\n \n+    void remove(ShardRouting shard) {\n+        ShardRouting previousValue = shards.remove(shard.shardId());\n+        assert previousValue == shard : \"expected shard \" + previousValue + \" but was \" + shard;","path":"core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java","position":17,"original_position":17,"commit_id":"26f7b2b95b24d4e3b7435f9cadbc9d391a704ff8","original_commit_id":"a3be7bee5de338d16cceb3a934c98a80dda54734","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"body":"I prefer this to be a soft check as it only verifies if we're using the internal API properly.","created_at":"2016-05-31T13:07:08Z","updated_at":"2016-05-31T13:07:08Z","html_url":"https://github.com/elastic/elasticsearch/pull/18615#discussion_r65177002","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/65177002"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/18615#discussion_r65177002"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615","id":71724152,"html_url":"https://github.com/elastic/elasticsearch/pull/18615","diff_url":"https://github.com/elastic/elasticsearch/pull/18615.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/18615.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18615","number":18615,"state":"open","locked":false,"title":"Clean up RoutingNodes","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"body":"This PR contains a number of cleanups related to recent changes in RoutingNodes:\r\n\r\n- PR #17821 (Immutable ShardRouting) changed RoutingNode to use a map indexed by ShardId to manage ShardRouting elements. This means that we can directly select the right ShardRouting without iterating over all elements. This lets us get rid of RoutingNodeIterator and all kind of iterations all over the place.\r\n\r\n- Second cleanup is an extension of #18390 (Expose cluster state before reroute in RoutingAllocation instead of RoutingNodes). We should not reexpose RoutingTable in RoutingNodes and only use it in the constructor. This makes it clear that the RoutingTable is only used to construct the RoutingNodes and can diverge from it afterwards (only RoutingNodes is mutable).\r\n\r\n- Remove AllocationService.applyNewNodes() (that is already done as part of construction of RoutingNodes)","created_at":"2016-05-27T14:44:14Z","updated_at":"2016-05-31T13:07:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1324a4091a635a1fd417d007267e05b18776c319","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18615/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/26f7b2b95b24d4e3b7435f9cadbc9d391a704ff8","head":{"label":"ywelsch:enhance/routingnodes-cleanup","ref":"enhance/routingnodes-cleanup","sha":"26f7b2b95b24d4e3b7435f9cadbc9d391a704ff8","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"repo":{"id":43299643,"name":"elasticsearch","full_name":"ywelsch/elasticsearch","owner":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ywelsch/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/ywelsch/elasticsearch","forks_url":"https://api.github.com/repos/ywelsch/elasticsearch/forks","keys_url":"https://api.github.com/repos/ywelsch/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ywelsch/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ywelsch/elasticsearch/teams","hooks_url":"https://api.github.com/repos/ywelsch/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/ywelsch/elasticsearch/events","assignees_url":"https://api.github.com/repos/ywelsch/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/ywelsch/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/ywelsch/elasticsearch/tags","blobs_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ywelsch/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/ywelsch/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/ywelsch/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/ywelsch/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/ywelsch/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/ywelsch/elasticsearch/subscription","commits_url":"https://api.github.com/repos/ywelsch/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/ywelsch/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/ywelsch/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/ywelsch/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ywelsch/elasticsearch/merges","archive_url":"https://api.github.com/repos/ywelsch/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ywelsch/elasticsearch/downloads","issues_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/ywelsch/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/ywelsch/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/ywelsch/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ywelsch/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/ywelsch/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/ywelsch/elasticsearch/deployments","created_at":"2015-09-28T12:30:36Z","updated_at":"2015-09-28T12:31:12Z","pushed_at":"2016-05-31T12:38:14Z","git_url":"git://github.com/ywelsch/elasticsearch.git","ssh_url":"git@github.com:ywelsch/elasticsearch.git","clone_url":"https://github.com/ywelsch/elasticsearch.git","svn_url":"https://github.com/ywelsch/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":218158,"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":"df7b3c6e82a77608851019f0236fb7769751e367","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-05-31T12:14:23Z","pushed_at":"2016-05-31T12:56:44Z","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":320693,"stargazers_count":16741,"watchers_count":16741,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5652,"mirror_url":null,"open_issues_count":1062,"forks":5652,"open_issues":1062,"watchers":16741,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/18615"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/18615"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/18615/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/18615/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/26f7b2b95b24d4e3b7435f9cadbc9d391a704ff8"}}}}
{"actor":{"display_login":"ywelsch"}}