aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-search
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@sonarsource.com>2014-09-23 10:43:05 +0200
committerStephane Gamard <stephane.gamard@sonarsource.com>2014-09-23 10:43:05 +0200
commitccdfa7b7a3e7107b056f10c3a73b0b1259acdf24 (patch)
treed1cb514e5ab6ca4946c8054e0b6d894d923503e6 /server/sonar-search
parent077bb617b7792cbfefd3f5afbdfe6b434ce6c9b8 (diff)
downloadsonarqube-ccdfa7b7a3e7107b056f10c3a73b0b1259acdf24.tar.gz
sonarqube-ccdfa7b7a3e7107b056f10c3a73b0b1259acdf24.zip
SONAR-5531 - Optimized refresh while mass indexing
Diffstat (limited to 'server/sonar-search')
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/SearchServer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
index 1433bd71b6e..1c2ffdc57e7 100644
--- a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
+++ b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
@@ -88,9 +88,13 @@ public class SearchServer implements Monitored {
.put("discovery.zen.ping.multicast.enabled", "false")
// Index storage policies
+ .put("index.refresh_interval", "30")
.put("index.number_of_shards", "1")
.put("index.number_of_replicas", MINIMUM_INDEX_REPLICATION)
.put("index.store.type", "mmapfs")
+ .put("indices.store.throttle.type", "none")
+ .put("index.merge.scheduler.max_thread_count",
+ Math.max(1, Math.min(3, Runtime.getRuntime().availableProcessors() / 2)))
// Install our own listUpdate scripts
.put("script.default_lang", "native")