Skip to content

Commit

Permalink
Clear unused flags to reduce load on cluster.
Browse files Browse the repository at this point in the history
A regression was introduced in the ES stats API call somewhere between ES 1.2.x. and 1.4.x that makes stats calls a lot more expensive. See elastic/elasticsearch#9681, https://groups.google.com/d/topic/elasticsearch/bOyBxgI9cMA/discussion and elastic/elasticsearch#9666 which are related issues. A ticket describing the exact issue is yet to be filed but I've been working offline on this with @imotov. The river makes frequent calls to the stats API which compounds the issue. Requesting only the needed thread_pool flags will contribute to mitigating the load on the cluster while the ES team fixes the stats issue on their side.
  • Loading branch information
George P. Stathis committed Feb 19, 2015
1 parent 34b54d8 commit 4545500
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -216,7 +216,7 @@ private void checkBulkProcessorAvailability() {
}

private long getBulkQueueSize() {
NodesInfoResponse response = client.admin().cluster().prepareNodesInfo().setThreadPool(true).get();
NodesInfoResponse response = client.admin().cluster().prepareNodesInfo().clear().setThreadPool(true).get();
for (NodeInfo node : response.getNodes()) {
Iterator<Info> iterator = node.getThreadPool().iterator();
while (iterator.hasNext()) {
Expand Down

0 comments on commit 4545500

Please sign in to comment.