TbSqlBlockingQueue does not log an error on InterruptedException because of normal lifecycle
This commit is contained in:
parent
da7cc60856
commit
70f7c8a132
@ -84,7 +84,6 @@ public class TbSqlBlockingQueue<E> implements TbSqlQueue<E> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
log.error("[{}] Failed to save {} entities", logName, entities.size(), t);
|
|
||||||
try {
|
try {
|
||||||
stats.incrementFailed(entities.size());
|
stats.incrementFailed(entities.size());
|
||||||
entities.forEach(entityFutureWrapper -> entityFutureWrapper.getFuture().setException(t));
|
entities.forEach(entityFutureWrapper -> entityFutureWrapper.getFuture().setException(t));
|
||||||
@ -94,6 +93,8 @@ public class TbSqlBlockingQueue<E> implements TbSqlQueue<E> {
|
|||||||
if (t instanceof InterruptedException) {
|
if (t instanceof InterruptedException) {
|
||||||
log.info("[{}] Queue polling was interrupted", logName);
|
log.info("[{}] Queue polling was interrupted", logName);
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
log.error("[{}] Failed to save {} entities", logName, entities.size(), t);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
entities.clear();
|
entities.clear();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user