only log async refresh / merge failure if the engine is not closed
This commit is contained in:
parent
ed99a51406
commit
bcd7d97c58
|
@ -659,11 +659,15 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
|
||||||
} else if (e.getCause() instanceof ThreadInterruptedException) {
|
} else if (e.getCause() instanceof ThreadInterruptedException) {
|
||||||
// ignore, we are being shutdown
|
// ignore, we are being shutdown
|
||||||
} else {
|
} else {
|
||||||
|
if (state != IndexShardState.CLOSED) {
|
||||||
logger.warn("Failed to perform scheduled engine refresh", e);
|
logger.warn("Failed to perform scheduled engine refresh", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (state != IndexShardState.CLOSED) {
|
||||||
logger.warn("Failed to perform scheduled engine refresh", e);
|
logger.warn("Failed to perform scheduled engine refresh", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
if (state != IndexShardState.CLOSED) {
|
if (state != IndexShardState.CLOSED) {
|
||||||
refreshScheduledFuture = threadPool.schedule(refreshInterval, ThreadPool.Names.SAME, EngineRefresher.this);
|
refreshScheduledFuture = threadPool.schedule(refreshInterval, ThreadPool.Names.SAME, EngineRefresher.this);
|
||||||
|
@ -700,11 +704,15 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
|
||||||
} else if (e.getCause() instanceof ThreadInterruptedException) {
|
} else if (e.getCause() instanceof ThreadInterruptedException) {
|
||||||
// ignore, we are being shutdown
|
// ignore, we are being shutdown
|
||||||
} else {
|
} else {
|
||||||
|
if (state != IndexShardState.CLOSED) {
|
||||||
logger.warn("Failed to perform scheduled engine optimize/merge", e);
|
logger.warn("Failed to perform scheduled engine optimize/merge", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (state != IndexShardState.CLOSED) {
|
||||||
logger.warn("Failed to perform scheduled engine optimize/merge", e);
|
logger.warn("Failed to perform scheduled engine optimize/merge", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
if (state != IndexShardState.CLOSED) {
|
if (state != IndexShardState.CLOSED) {
|
||||||
mergeScheduleFuture = threadPool.schedule(mergeInterval, ThreadPool.Names.SAME, EngineMerger.this);
|
mergeScheduleFuture = threadPool.schedule(mergeInterval, ThreadPool.Names.SAME, EngineMerger.this);
|
||||||
|
|
Loading…
Reference in New Issue