From 5c6d8314c0b279cfa96087bf684dec50bdb7a645 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sun, 29 Apr 2012 19:43:09 +0300 Subject: [PATCH] make the call the apply settings sync'ed --- .../index/search/slowlog/ShardSlowLogSearchService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/index/search/slowlog/ShardSlowLogSearchService.java b/src/main/java/org/elasticsearch/index/search/slowlog/ShardSlowLogSearchService.java index 6cddb963105..7664cf99a54 100644 --- a/src/main/java/org/elasticsearch/index/search/slowlog/ShardSlowLogSearchService.java +++ b/src/main/java/org/elasticsearch/index/search/slowlog/ShardSlowLogSearchService.java @@ -73,7 +73,7 @@ public class ShardSlowLogSearchService extends AbstractIndexShardComponent { class ApplySettings implements IndexSettingsService.Listener { @Override - public void onRefreshSettings(Settings settings) { + public synchronized void onRefreshSettings(Settings settings) { long queryWarnThreshold = settings.getAsTime("index.search.slowlog.threshold.query.warn", TimeValue.timeValueNanos(ShardSlowLogSearchService.this.queryWarnThreshold)).nanos(); if (queryWarnThreshold != ShardSlowLogSearchService.this.queryWarnThreshold) { ShardSlowLogSearchService.this.queryWarnThreshold = queryWarnThreshold;