diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-09-10 16:18:33 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-09-14 21:46:39 +0200 |
commit | 6753155e4dd6d1ccb800703ded086cc601d9a405 (patch) | |
tree | fa01f195eb3b7ef00b669ff7056abf3cfb9391f0 /server | |
parent | e296ddad533fd911670c391cb87ca348b2c85ba9 (diff) | |
download | sonarqube-6753155e4dd6d1ccb800703ded086cc601d9a405.tar.gz sonarqube-6753155e4dd6d1ccb800703ded086cc601d9a405.zip |
Upgrade to Elasticsearch 1.7.1
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java | 2 | ||||
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/es/EsClient.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java index 05dc434bb51..cc0ae492ac2 100644 --- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java +++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java @@ -117,7 +117,7 @@ public class IssueIndexBenchmarkTest { benchmark.expectAround("Throughput to index issues", throughputPerSecond, 6500, Benchmark.DEFAULT_ERROR_MARGIN_PERCENTS); // be sure that physical files do not evolve during estimation of size - tester.get(EsClient.class).prepareOptimize("issues").setWaitForMerge(true).get(); + tester.get(EsClient.class).prepareOptimize("issues").get(); long dirSize = FileUtils.sizeOfDirectory(tester.getEsServerHolder().getHomeDir()); LOGGER.info(String.format("ES dir: " + FileUtils.byteCountToDisplaySize(dirSize))); benchmark.expectBetween("ES dir size (b)", dirSize, 200L * FileUtils.ONE_MB, 420L * FileUtils.ONE_MB); diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/EsClient.java b/server/sonar-server/src/main/java/org/sonar/server/es/EsClient.java index 61e61608210..13a3400b961 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/EsClient.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/EsClient.java @@ -175,8 +175,7 @@ public class EsClient implements Startable { public OptimizeRequestBuilder prepareOptimize(String indexName) { // TODO add proxy for profiling return nativeClient().admin().indices().prepareOptimize(indexName) - .setMaxNumSegments(1) - .setWaitForMerge(true); + .setMaxNumSegments(1); } public ClearIndicesCacheRequestBuilder prepareClearCache(String... indices) { |