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() {
|
threadPool.executor(ThreadPool.Names.MANAGEMENT).execute(new Runnable() {
|
||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
try {
|
try {
|
||||||
indexShard.flush(new Engine.Flush());
|
if (indexShard.state() == IndexShardState.STARTED) {
|
||||||
|
indexShard.flush(new Engine.Flush());
|
||||||
|
}
|
||||||
} catch (EngineClosedException e) {
|
} catch (EngineClosedException e) {
|
||||||
// we are being closed, ignore
|
// we are being closed, ignore
|
||||||
} catch (FlushNotAllowedEngineException e) {
|
} catch (FlushNotAllowedEngineException e) {
|
||||||
|
|
Loading…
Reference in New Issue