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 {
|
||||
// only flush we are we closed (closed index or shutdown) and if we are not deleted
|
||||
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);
|
||||
} catch (Exception 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
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.trace("skipping flushAndClose as already closed");
|
||||
}
|
||||
awaitPendingClose();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue