{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/108284314","pull_request_review_id":29306592,"id":108284314,"diff_hunk":"@@ -469,35 +525,25 @@ static boolean shouldExecuteReplicaItem(final BulkItemRequest request, final int\n     class ConcreteMappingUpdatePerformer implements MappingUpdatePerformer {\n \n         @Nullable\n-        public MappingUpdateResult updateMappingsIfNeeded(IndexShard primary, IndexRequest request) throws Exception {\n-            Engine.Index operation;\n-            try {\n-                operation = prepareIndexOperationOnPrimary(request, primary);\n-            } catch (MapperParsingException | IllegalArgumentException e) {\n-                return new MappingUpdateResult(e);\n-            }\n+        public void updateMappingsIfNeeded(IndexShard primary, IndexRequest request) throws Exception {\n+            final Engine.Index operation = prepareIndexOperationOnPrimary(request, primary);","path":"core/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java","position":240,"original_position":240,"commit_id":"1941ad86e1e267da57cf1ec116ba14f46a9d437c","original_commit_id":"1941ad86e1e267da57cf1ec116ba14f46a9d437c","user":{"login":"areek","id":753679,"avatar_url":"https://avatars2.githubusercontent.com/u/753679?v=3","gravatar_id":"","url":"https://api.github.com/users/areek","html_url":"https://github.com/areek","followers_url":"https://api.github.com/users/areek/followers","following_url":"https://api.github.com/users/areek/following{/other_user}","gists_url":"https://api.github.com/users/areek/gists{/gist_id}","starred_url":"https://api.github.com/users/areek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/areek/subscriptions","organizations_url":"https://api.github.com/users/areek/orgs","repos_url":"https://api.github.com/users/areek/repos","events_url":"https://api.github.com/users/areek/events{/privacy}","received_events_url":"https://api.github.com/users/areek/received_events","type":"User","site_admin":false},"body":"see [comment](https://github.com/elastic/elasticsearch/pull/23665/files#r108282321)","created_at":"2017-03-27T21:27:41Z","updated_at":"2017-03-27T21:27:41Z","html_url":"https://github.com/elastic/elasticsearch/pull/23665#discussion_r108284314","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/108284314"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/23665#discussion_r108284314"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665","id":111664835,"html_url":"https://github.com/elastic/elasticsearch/pull/23665","diff_url":"https://github.com/elastic/elasticsearch/pull/23665.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/23665.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23665","number":23665,"state":"open","locked":false,"title":"Further refactor and extend testing for `TransportShardBulkAction`","user":{"login":"dakrone","id":19060,"avatar_url":"https://avatars0.githubusercontent.com/u/19060?v=3","gravatar_id":"","url":"https://api.github.com/users/dakrone","html_url":"https://github.com/dakrone","followers_url":"https://api.github.com/users/dakrone/followers","following_url":"https://api.github.com/users/dakrone/following{/other_user}","gists_url":"https://api.github.com/users/dakrone/gists{/gist_id}","starred_url":"https://api.github.com/users/dakrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakrone/subscriptions","organizations_url":"https://api.github.com/users/dakrone/orgs","repos_url":"https://api.github.com/users/dakrone/repos","events_url":"https://api.github.com/users/dakrone/events{/privacy}","received_events_url":"https://api.github.com/users/dakrone/received_events","type":"User","site_admin":false},"body":"This moves `updateReplicaRequest` to `createPrimaryResponse` and separates the\r\ntranslog updating to be a separate function so that the function purpose is more\r\neasily understood (and testable).\r\n\r\nIt also separates the logic for `MappingUpdatePerformer` into two functions,\r\n`updateMappingsIfNeeded` and `verifyMappings` so they don't do too much in a\r\nsingle function. This allows finer-grained error testing for when a mapping\r\nfails to parse or be applied.\r\n\r\nFinally, it separates parsing and version validation for\r\n`executeIndexRequestOnReplica` into a separate\r\nmethod (`prepareIndexOperationOnReplica`) and adds a test for it.\r\n\r\nRelates to #23359","created_at":"2017-03-20T22:26:40Z","updated_at":"2017-03-27T21:27:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c91944f3c21d58e3a5f5ef23beef4071b3763ba","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23665/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/1941ad86e1e267da57cf1ec116ba14f46a9d437c","head":{"label":"dakrone:more-shardbulk-refactoring","ref":"more-shardbulk-refactoring","sha":"1941ad86e1e267da57cf1ec116ba14f46a9d437c","user":{"login":"dakrone","id":19060,"avatar_url":"https://avatars0.githubusercontent.com/u/19060?v=3","gravatar_id":"","url":"https://api.github.com/users/dakrone","html_url":"https://github.com/dakrone","followers_url":"https://api.github.com/users/dakrone/followers","following_url":"https://api.github.com/users/dakrone/following{/other_user}","gists_url":"https://api.github.com/users/dakrone/gists{/gist_id}","starred_url":"https://api.github.com/users/dakrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakrone/subscriptions","organizations_url":"https://api.github.com/users/dakrone/orgs","repos_url":"https://api.github.com/users/dakrone/repos","events_url":"https://api.github.com/users/dakrone/events{/privacy}","received_events_url":"https://api.github.com/users/dakrone/received_events","type":"User","site_admin":false},"repo":{"id":3037278,"name":"elasticsearch","full_name":"dakrone/elasticsearch","owner":{"login":"dakrone","id":19060,"avatar_url":"https://avatars0.githubusercontent.com/u/19060?v=3","gravatar_id":"","url":"https://api.github.com/users/dakrone","html_url":"https://github.com/dakrone","followers_url":"https://api.github.com/users/dakrone/followers","following_url":"https://api.github.com/users/dakrone/following{/other_user}","gists_url":"https://api.github.com/users/dakrone/gists{/gist_id}","starred_url":"https://api.github.com/users/dakrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakrone/subscriptions","organizations_url":"https://api.github.com/users/dakrone/orgs","repos_url":"https://api.github.com/users/dakrone/repos","events_url":"https://api.github.com/users/dakrone/events{/privacy}","received_events_url":"https://api.github.com/users/dakrone/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dakrone/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/dakrone/elasticsearch","forks_url":"https://api.github.com/repos/dakrone/elasticsearch/forks","keys_url":"https://api.github.com/repos/dakrone/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dakrone/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dakrone/elasticsearch/teams","hooks_url":"https://api.github.com/repos/dakrone/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/dakrone/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/dakrone/elasticsearch/events","assignees_url":"https://api.github.com/repos/dakrone/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/dakrone/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/dakrone/elasticsearch/tags","blobs_url":"https://api.github.com/repos/dakrone/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dakrone/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dakrone/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/dakrone/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dakrone/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/dakrone/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/dakrone/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/dakrone/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/dakrone/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/dakrone/elasticsearch/subscription","commits_url":"https://api.github.com/repos/dakrone/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/dakrone/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/dakrone/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/dakrone/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/dakrone/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/dakrone/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dakrone/elasticsearch/merges","archive_url":"https://api.github.com/repos/dakrone/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dakrone/elasticsearch/downloads","issues_url":"https://api.github.com/repos/dakrone/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/dakrone/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/dakrone/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/dakrone/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dakrone/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/dakrone/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/dakrone/elasticsearch/deployments","created_at":"2011-12-22T23:14:00Z","updated_at":"2017-02-17T09:39:58Z","pushed_at":"2017-03-27T20:05:10Z","git_url":"git://github.com/dakrone/elasticsearch.git","ssh_url":"git@github.com:dakrone/elasticsearch.git","clone_url":"https://github.com/dakrone/elasticsearch.git","svn_url":"https://github.com/dakrone/elasticsearch","homepage":"http://elasticsearch.org","size":258516,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"ce085940082e7e1a59ac25a22787a0c1eccbe28c","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars3.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://avatars3.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":"2017-03-27T19:15:18Z","pushed_at":"2017-03-27T20:47:57Z","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":331196,"stargazers_count":21674,"watchers_count":21674,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7189,"mirror_url":null,"open_issues_count":1357,"forks":7189,"open_issues":1357,"watchers":21674,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/23665"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/23665"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/23665/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/23665/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/1941ad86e1e267da57cf1ec116ba14f46a9d437c"}}}}
{"actor":{"display_login":"areek"}}