make the call the apply settings sync'ed

This commit is contained in:
Shay Banon 2012-04-29 19:43:09 +03:00
parent 4a21ddf6f3
commit 5c6d8314c0
1 changed files with 1 additions and 1 deletions

View File

@ -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;