Add additional logging for #43034
It's unclear why sometimes the shard is not flushed on closing
This commit is contained in:
parent
127a608147
commit
19520d4640
|
@ -472,6 +472,8 @@ public class IndexService extends AbstractIndexComponent implements IndicesClust
|
||||||
try {
|
try {
|
||||||
// only flush we are we closed (closed index or shutdown) and if we are not deleted
|
// only flush we are we closed (closed index or shutdown) and if we are not deleted
|
||||||
final boolean flushEngine = deleted.get() == false && closed.get();
|
final boolean flushEngine = deleted.get() == false && closed.get();
|
||||||
|
logger.trace("[{}] closing shard (flushEngine: {}, deleted: {}, closed: {})", shardId, flushEngine, deleted.get(),
|
||||||
|
closed.get());
|
||||||
indexShard.close(reason, flushEngine);
|
indexShard.close(reason, flushEngine);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug(() -> new ParameterizedMessage("[{}] failed to close index shard", shardId), e);
|
logger.debug(() -> new ParameterizedMessage("[{}] failed to close index shard", shardId), e);
|
||||||
|
|
|
@ -1716,6 +1716,8 @@ public abstract class Engine implements Closeable {
|
||||||
close(); // double close is not a problem
|
close(); // double close is not a problem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
logger.trace("skipping flushAndClose as already closed");
|
||||||
}
|
}
|
||||||
awaitPendingClose();
|
awaitPendingClose();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue