diff --git a/src/main/java/org/elasticsearch/index/engine/internal/InternalEngine.java b/src/main/java/org/elasticsearch/index/engine/internal/InternalEngine.java index 4bf11552c19..8ff4a4254d8 100644 --- a/src/main/java/org/elasticsearch/index/engine/internal/InternalEngine.java +++ b/src/main/java/org/elasticsearch/index/engine/internal/InternalEngine.java @@ -1314,12 +1314,14 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin @Override public void close() throws ElasticsearchException { try (InternalLock _ = writeLock.acquire()) { + logger.debug("close acquired writeLock"); if (!closed) { try { closed = true; indexSettingsService.removeListener(applySettings); this.versionMap.clear(); this.failedEngineListeners.clear(); + logger.debug("close searcherManager"); try { IOUtils.close(searcherManager); } catch (Throwable t) { @@ -1327,16 +1329,13 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin } // no need to commit in this case!, we snapshot before we close the shard, so translog and all sync'ed if (indexWriter != null) { - long t0 = System.nanoTime(); + logger.debug("rollback indexWriter"); try { indexWriter.rollback(); } catch (AlreadyClosedException e) { // ignore } - long t1 = System.nanoTime(); - if (logger.isDebugEnabled()) { - logger.debug("indexWriter.rollback took {} nanoseconds", t1-t0); - } + logger.debug("rollback indexWriter done"); } } catch (Throwable e) { logger.warn("failed to rollback writer on close", e);