From 9981d69e067cd5df3b960c38951c37cdbc762b0f Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Thu, 9 Apr 2015 05:00:40 -0400 Subject: [PATCH] Core: add trace logging for the commitTranslog=false case in InternalEngine.flush --- .../java/org/elasticsearch/index/engine/InternalEngine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }