{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/19573","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19573/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19573/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19573/events","html_url":"https://github.com/elastic/elasticsearch/issues/19573","id":167349565,"number":19573,"title":"Don't swallow the original IOException thrown at JSON parsing in slowlogs","user":{"login":"astefan","id":893749,"avatar_url":"https://avatars.githubusercontent.com/u/893749?v=3","gravatar_id":"","url":"https://api.github.com/users/astefan","html_url":"https://github.com/astefan","followers_url":"https://api.github.com/users/astefan/followers","following_url":"https://api.github.com/users/astefan/following{/other_user}","gists_url":"https://api.github.com/users/astefan/gists{/gist_id}","starred_url":"https://api.github.com/users/astefan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astefan/subscriptions","organizations_url":"https://api.github.com/users/astefan/orgs","repos_url":"https://api.github.com/users/astefan/repos","events_url":"https://api.github.com/users/astefan/events{/privacy}","received_events_url":"https://api.github.com/users/astefan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-25T11:59:41Z","updated_at":"2016-07-25T15:48:18Z","closed_at":null,"body":"**Elasticsearch version**: 1.7.5\r\n\r\n**JVM version**: 1.8.0_77\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\n\r\nThe slowlogs are hidding and not logging the original IOException thrown in the [slowlog indexing](https://github.com/elastic/elasticsearch/blob/v1.7.5/src/main/java/org/elasticsearch/index/indexing/slowlog/ShardSlowLogIndexingService.java#L160-L168) and [searching](https://github.com/elastic/elasticsearch/blob/v1.7.5/src/main/java/org/elasticsearch/index/search/slowlog/ShardSlowLogSearchService.java#L203-L220) utility classes. The same seems to be happening for 2.3.x.\r\n\r\nAs such in slowlogs entries like the following are logged and there are no clues as to what the original request was and why it failed:\r\n\r\n```\r\n[2016-07-25 09:10:38,310][INFO ][index.indexing.slowlog.index] [some_node] [some_index][3] took[7.2s], took_millis[7200], type[some_type], id[12345], routing[12345], source[source[_failed_to_convert_]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/234994053","html_url":"https://github.com/elastic/elasticsearch/issues/19573#issuecomment-234994053","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19573","id":234994053,"user":{"login":"rjernst","id":289412,"avatar_url":"https://avatars.githubusercontent.com/u/289412?v=3","gravatar_id":"","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T15:48:18Z","updated_at":"2016-07-25T15:48:18Z","body":"This is a typical case of exception swallowing. For master, the code is in `IndexingSlowLog` line 193.  We could easily change this catch to rethrow as an `UncheckedIOException`. However, that would propagate up and cause the indexing request to fail, even though the actual indexing already succeeded. So we could either do that, or log the exception in the slow log itself. I don't know which is better, I've marked this issue for discussion."}}
{"actor":{"display_login":"rjernst"}}