Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

when getting the _meta doc from _river index (per river), make sure t…

…he callback listener is threaded
  • Loading branch information...
commit 8f55e8835f7b3508f4783e34ea4243b9cb85596f 1 parent 5c783c8
@kimchy kimchy authored
View
4 modules/elasticsearch/src/main/java/org/elasticsearch/river/RiversService.java
@@ -218,7 +218,7 @@ public synchronized void closeRiver(RiverName riverName) throws ElasticSearchExc
if (rivers.containsKey(routing.riverName())) {
continue;
}
- client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(new ActionListener<GetResponse>() {
+ client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").setListenerThreaded(true).execute(new ActionListener<GetResponse>() {
@Override public void onResponse(GetResponse getResponse) {
if (!rivers.containsKey(routing.riverName())) {
if (getResponse.exists()) {
@@ -238,7 +238,7 @@ public synchronized void closeRiver(RiverName riverName) throws ElasticSearchExc
final ActionListener<GetResponse> listener = this;
threadPool.schedule(TimeValue.timeValueSeconds(5), ThreadPool.Names.SAME, new Runnable() {
@Override public void run() {
- client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
+ client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").setListenerThreaded(true).execute(listener);
}
});
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.