]> source.dussan.org Git - sonarqube.git/commitdiff
Increased timeout for denomarlization stack
authorStephane Gamard <stephane.gamard@sonarsource.com>
Wed, 1 Oct 2014 14:55:25 +0000 (16:55 +0200)
committerStephane Gamard <stephane.gamard@sonarsource.com>
Wed, 1 Oct 2014 14:55:25 +0000 (16:55 +0200)
server/sonar-server/src/main/java/org/sonar/server/search/IndexQueue.java

index 3b6bd8d0cc5b1447969d19af238b24207a4922d7..4c0cdbbe6259c71c1c1d10605c88a73a28e6aaae 100644 (file)
@@ -56,7 +56,7 @@ public class IndexQueue implements ServerComponent, WorkQueue<IndexAction<?>> {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(IndexQueue.class);
 
-  private static final Integer CONCURRENT_NORMALIZATION_FACTOR = 3;
+  private static final Integer CONCURRENT_NORMALIZATION_FACTOR = 1;
 
   public IndexQueue(Settings settings, SearchClient searchClient, ComponentContainer container) {
     this.searchClient = searchClient;
@@ -136,7 +136,7 @@ public class IndexQueue implements ServerComponent, WorkQueue<IndexAction<?>> {
       boolean hasInlineRefreshRequest = false;
       ExecutorService executorService = Executors.newFixedThreadPool(CONCURRENT_NORMALIZATION_FACTOR);
       // invokeAll() blocks until ALL tasks submitted to executor complete
-      List<Future<List<? extends ActionRequest>>> requests = executorService.invokeAll(actions, 20, TimeUnit.SECONDS);
+      List<Future<List<? extends ActionRequest>>> requests = executorService.invokeAll(actions, 20, TimeUnit.MINUTES);
       for (Future<List<? extends ActionRequest>> updates : requests) {
         for (ActionRequest update : updates.get()) {