only log async refresh / merge failure if the engine is not closed

This commit is contained in:
Shay Banon 2011-09-03 20:24:55 +03:00
parent ed99a51406
commit bcd7d97c58
1 changed files with 12 additions and 4 deletions

View File

@ -659,10 +659,14 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
} else if (e.getCause() instanceof ThreadInterruptedException) {
// ignore, we are being shutdown
} else {
logger.warn("Failed to perform scheduled engine refresh", e);
if (state != IndexShardState.CLOSED) {
logger.warn("Failed to perform scheduled engine refresh", e);
}
}
} catch (Exception e) {
logger.warn("Failed to perform scheduled engine refresh", e);
if (state != IndexShardState.CLOSED) {
logger.warn("Failed to perform scheduled engine refresh", e);
}
}
synchronized (mutex) {
if (state != IndexShardState.CLOSED) {
@ -700,10 +704,14 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I
} else if (e.getCause() instanceof ThreadInterruptedException) {
// ignore, we are being shutdown
} else {
logger.warn("Failed to perform scheduled engine optimize/merge", e);
if (state != IndexShardState.CLOSED) {
logger.warn("Failed to perform scheduled engine optimize/merge", e);
}
}
} catch (Exception e) {
logger.warn("Failed to perform scheduled engine optimize/merge", e);
if (state != IndexShardState.CLOSED) {
logger.warn("Failed to perform scheduled engine optimize/merge", e);
}
}
synchronized (mutex) {
if (state != IndexShardState.CLOSED) {