only flush when the index shard is in STARTED mode (nothing will break flushing on non started index, just remove a possible warn logging)
This commit is contained in:
parent
0662f65fda
commit
9d81d01c93
|
@ -116,7 +116,9 @@ public class TranslogService extends AbstractIndexShardComponent {
|
|||
threadPool.executor(ThreadPool.Names.MANAGEMENT).execute(new Runnable() {
|
||||
@Override public void run() {
|
||||
try {
|
||||
indexShard.flush(new Engine.Flush());
|
||||
if (indexShard.state() == IndexShardState.STARTED) {
|
||||
indexShard.flush(new Engine.Flush());
|
||||
}
|
||||
} catch (EngineClosedException e) {
|
||||
// we are being closed, ignore
|
||||
} catch (FlushNotAllowedEngineException e) {
|
||||
|
|
Loading…
Reference in New Issue