@Override public IndexCommitRef acquireLastIndexCommit(final boolean flushFirst) throws EngineException { // we have to flush outside of the readlock otherwise we might have a problem upgrading // the to a write lock when we fail the engine in this operation if (flushFirst) { logger.trace("start flush for snapshot"); flush(false, true); logger.trace("finish flush for snapshot"); } final IndexCommit lastCommit = combinedDeletionPolicy.acquireIndexCommit(false); return new Engine.IndexCommitRef(lastCommit, () -> releaseIndexCommit(lastCommit)); }
@Override public IndexCommitRef acquireLastIndexCommit(final boolean flushFirst) throws EngineException { // we have to flush outside of the readlock otherwise we might have a problem upgrading // the to a write lock when we fail the engine in this operation if (flushFirst) { logger.trace("start flush for snapshot"); flush(false, true); logger.trace("finish flush for snapshot"); } final IndexCommit lastCommit = combinedDeletionPolicy.acquireIndexCommit(false); return new Engine.IndexCommitRef(lastCommit, () -> releaseIndexCommit(lastCommit)); }
@Override public IndexCommitRef acquireLastIndexCommit(boolean flushFirst) { store.incRef(); return new IndexCommitRef(indexCommit, store::decRef); }
@Override public IndexCommitRef acquireSafeIndexCommit() throws EngineException { final IndexCommit safeCommit = combinedDeletionPolicy.acquireIndexCommit(true); return new Engine.IndexCommitRef(safeCommit, () -> releaseIndexCommit(safeCommit)); }
@Override public IndexCommitRef acquireLastIndexCommit(boolean flushFirst) { store.incRef(); return new IndexCommitRef(indexCommit, store::decRef); }
@Override public IndexCommitRef acquireLastIndexCommit(boolean flushFirst) { store.incRef(); return new IndexCommitRef(indexCommit, store::decRef); }
@Override public IndexCommitRef acquireSafeIndexCommit() throws EngineException { final IndexCommit safeCommit = combinedDeletionPolicy.acquireIndexCommit(true); return new Engine.IndexCommitRef(safeCommit, () -> releaseIndexCommit(safeCommit)); }