From 01519745007b2d093cdf602783c27a26de82c69b Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 21 Sep 2016 14:20:24 +0200 Subject: `_flush` should block by default (#20597) This commit changes the default behavior of `_flush` to block if other flushes are ongoing. This also removes the use of `FlushNotAllowedException` and instead simply return immediately by skipping the flush. Users should be aware if they set this option that the flush might or might not flush everything to disk ie. no transactional behavior of some sort. Closes #20569 --- .../test/java/org/elasticsearch/versioning/SimpleVersioningIT.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'core/src/test/java/org/elasticsearch/versioning') diff --git a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java index b80c5bd8e2..c5d0129644 100644 --- a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java +++ b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java @@ -29,7 +29,6 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.lucene.uid.Versions; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.engine.FlushNotAllowedEngineException; import org.elasticsearch.index.engine.VersionConflictEngineException; import org.elasticsearch.test.ESIntegTestCase; @@ -617,11 +616,7 @@ public class SimpleVersioningIT extends ESIntegTestCase { } if (threadRandom.nextInt(100) == 7) { logger.trace("--> {}: TEST: now flush at {}", threadID, System.nanoTime() - startTime); - try { - flush(); - } catch (FlushNotAllowedEngineException fnaee) { - // OK - } + flush(); logger.trace("--> {}: TEST: flush done at {}", threadID, System.nanoTime() - startTime); } } -- cgit v1.2.3