From 7f541709a4f344978f774d15eed1caa23269efa7 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Thu, 18 Dec 2014 10:54:03 +0100 Subject: [PATCH] Internal: PlainTransportFuture should not set currentThread().interrupt() We use PlainTransportFuture as a future for our transport calls. If someone blocks on it and it is interrupted, we throw an ElasticsearchIllegalStateException. We should not set Thread.currentThread().interrupt(); in this case because we already communicate the interrupt through an exception. Closes #9001 --- .../java/org/elasticsearch/transport/PlainTransportFuture.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/transport/PlainTransportFuture.java b/src/main/java/org/elasticsearch/transport/PlainTransportFuture.java index 812eec9f64b0b..739ad3040cfa1 100644 --- a/src/main/java/org/elasticsearch/transport/PlainTransportFuture.java +++ b/src/main/java/org/elasticsearch/transport/PlainTransportFuture.java @@ -62,7 +62,6 @@ public V txGet(long timeout, TimeUnit unit) throws ElasticsearchException { } catch (TimeoutException e) { throw new ElasticsearchTimeoutException(e.getMessage()); } catch (InterruptedException e) { - Thread.currentThread().interrupt(); throw new ElasticsearchIllegalStateException("Future got interrupted", e); } catch (ExecutionException e) { if (e.getCause() instanceof ElasticsearchException) {