Percolate / Analyzer API can hang if it fails to execute, closes #1457.

This commit is contained in:
Shay Banon 2011-11-13 19:54:13 +02:00
parent e0acf13a12
commit 3da6e0a5b0
1 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,7 @@ public abstract class TransportSingleCustomOperationAction<Request extends Singl
Response response = shardOperation(request, shard.id());
listener.onResponse(response);
} catch (Exception e) {
shardsIt.reset();
onFailure(shard, e);
}
}
@ -153,6 +154,7 @@ public abstract class TransportSingleCustomOperationAction<Request extends Singl
listener.onResponse(response);
return;
} catch (Exception e) {
shardsIt.reset();
onFailure(shard, e);
}
}
@ -204,6 +206,8 @@ public abstract class TransportSingleCustomOperationAction<Request extends Singl
onFailure(shard, e);
}
}
} else {
perform(lastException);
}
} else {
DiscoveryNode node = nodes.get(shard.currentNodeId());