Billie Rinaldi created ACCUMULO-3507:
----------------------------------------
Summary: NamingThreadFactory.newThread should not wrap runnable
with TraceRunnable
Key: ACCUMULO-3507
URL: https://issues.apache.org/jira/browse/ACCUMULO-3507
Project: Accumulo
Issue Type: Bug
Components: trace
Reporter: Billie Rinaldi
Assignee: Billie Rinaldi
Fix For: 1.7.0
NamingThreadFactory has the following implementation of newThread:
{noformat}
public Thread newThread(Runnable r) {
return new Daemon(new LoggingRunnable(log, new TraceRunnable(r)), ...);
}
{noformat}
The runnable passed to newThread by ThreadPoolExecutor is a Worker that will
run multiple tasks over its lifetime. It is unlikely that we want to trace the
entire execution of a reused thread in one of our thread pools, as opposed to
tracing individual tasks. We should change this to new LoggingRunnable(log, r).
Some of our thread pools already trace individual tasks by wrapping a
ThreadPoolExecutor in TraceExecutorService. Other pools that want to introduce
task tracing may use that method as well. (The pools currently tracing threads
but not tracing tasks are scanner read ahead, add splits, bloom loader, LRU
block cache stats, gc deleting, walog sort starter, multiple bulk import pools,
problem reporting, and others that are using SimpleThreadPool.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)