{"action":"opened","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/19508","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19508/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19508/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19508/events","html_url":"https://github.com/elastic/elasticsearch/issues/19508","id":166433776,"number":19508,"title":"EsAbortPolicy violates the RejectedExecutionHandler API","user":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Exceptions","name":":Exceptions","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/PITA","name":"PITA","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-19T20:57:36Z","updated_at":"2016-07-19T20:57:36Z","closed_at":null,"body":"The interface for `RejectedExecutionHandler` says:\r\n\r\n```java\r\npublic interface RejectedExecutionHandler {\r\n    /**\r\n     * Method that may be invoked by a {@link ThreadPoolExecutor} when\r\n     * {@link ThreadPoolExecutor#execute execute} cannot accept a\r\n     * task.  This may occur when no more threads or queue slots are\r\n     * available because their bounds would be exceeded, or upon\r\n     * shutdown of the Executor.\r\n     *\r\n     * <p>In the absence of other alternatives, the method may throw\r\n     * an unchecked {@link RejectedExecutionException}, which will be\r\n     * propagated to the caller of {@code execute}.\r\n     *\r\n     * @param r the runnable task requested to be executed\r\n     * @param executor the executor attempting to execute this task\r\n     * @throws RejectedExecutionException if there is no remedy\r\n     */\r\n    void rejectedExecution(Runnable r, ThreadPoolExecutor executor);\r\n}\r\n```\r\n\r\nIt's the `@throws` clause that is violated. However, `EsAbortPolicy` throws an `EsRejectedExecutionException` which does not inherit from `RejectedExecutionException`. This leads to situations that commits like 770186f6cfd1a843f6cfca3df791093459b47f4b need to remedy. This should be cleaned up, but it's probably not a small task."}}
{"actor":{"display_login":"jasontedor"}}