dlmarion commented on a change in pull request #1818:
URL: https://github.com/apache/accumulo/pull/1818#discussion_r532900453
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
##########
@@ -100,10 +93,19 @@ static int getInstanceThreadPoolSize() {
return instanceThreadPoolSize;
}
- private SimpleTimer(int threadPoolSize) {
+ protected SimpleTimer(int threadPoolSize) {
executor = Executors.newScheduledThreadPool(threadPoolSize,
new
ThreadFactoryBuilder().setNameFormat("SimpleTimer-%d").setDaemon(true)
- .setUncaughtExceptionHandler(new ExceptionHandler()).build());
+
.setUncaughtExceptionHandler(getUncaughtExceptionHandler()).build());
+ }
+
+ protected Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() {
+ return new Thread.UncaughtExceptionHandler() {
+ @Override
+ public void uncaughtException(Thread t, Throwable e) {
+ log.warn("SimpleTimer task failed", e);
+ }
+ };
Review comment:
I agree, I'm not sure I have the ability to decide what is critical vs
what is not. I came across a reference to new JVM parameters that may take OOME
handling out of our hands:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8152669
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]