Only try to read new segments info if we really flushed the index (#20474)
There is no reason to read the current segments info unless we flushed / committed the lucene index.
This commit is contained in:
parent
412c61c402
commit
c1e84618a6
|
@ -789,7 +789,6 @@ public class InternalEngine extends Engine {
|
|||
} catch (Exception e) {
|
||||
throw new FlushFailedEngineException(shardId, e);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* we have to inc-ref the store here since if the engine is closed by a tragic event
|
||||
* we don't acquire the write lock and wait until we have exclusive access. This might also
|
||||
|
@ -814,6 +813,7 @@ public class InternalEngine extends Engine {
|
|||
} finally {
|
||||
store.decRef();
|
||||
}
|
||||
}
|
||||
newCommitId = lastCommittedSegmentInfos.getId();
|
||||
} catch (FlushFailedEngineException ex) {
|
||||
maybeFailEngine("flush", ex);
|
||||
|
|
Loading…
Reference in New Issue