diff --git a/src/main/java/org/elasticsearch/index/engine/InternalEngine.java b/src/main/java/org/elasticsearch/index/engine/InternalEngine.java index 2c4d31edd4c..9ae31e24244 100644 --- a/src/main/java/org/elasticsearch/index/engine/InternalEngine.java +++ b/src/main/java/org/elasticsearch/index/engine/InternalEngine.java @@ -621,7 +621,7 @@ public class InternalEngine extends Engine { long translogId = translogIdGenerator.incrementAndGet(); translog.newTransientTranslog(translogId); indexWriter.setCommitData(Collections.singletonMap(Translog.TRANSLOG_ID_KEY, Long.toString(translogId))); - logger.trace("starting commit for flush"); + logger.trace("starting commit for flush; commitTranslog=true"); commitIndexWriter(indexWriter); logger.trace("finished commit for flush"); // we need to refresh in order to clear older version values @@ -650,7 +650,9 @@ public class InternalEngine extends Engine { try { long translogId = translog.currentId(); indexWriter.setCommitData(Collections.singletonMap(Translog.TRANSLOG_ID_KEY, Long.toString(translogId))); + logger.trace("starting commit for flush; commitTranslog=false"); commitIndexWriter(indexWriter); + logger.trace("finished commit for flush"); } catch (Throwable e) { throw new FlushFailedEngineException(shardId, e); }