[ 
https://issues.apache.org/jira/browse/HTRACE-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15243559#comment-15243559
 ] 

Colin Patrick McCabe commented on HTRACE-355:
---------------------------------------------

This is basically a bug... we intended to set the scope name based on the child 
thread's name, as was done in 3.2 and earlier releases.  I don't think anyone 
has started to depend on the new behavior yet, so we should be able to fix this 
easily in 4.2.

{code}
    runnableLatch.await(1, TimeUnit.SECONDS);
{code}
This is a very short timeout.  It seems like this could lead to spurious test 
failures on a GC or similar event.  This should be at least 60 seconds to match 
our other test timeouts.

{code}
38      @Before
39        public void setup() {
40          tracer = new 
Tracer.Builder("TestTraceExecutor").conf(HTraceConfiguration.fromKeyValuePairs("sampler.classes",
 "AlwaysSampler")).build();
41        }
42      
43        @After
44        public void teardown() {
45          tracer.close();
46        }
{code}
Considering it's just one line of setup, can we just do this in the test 
itself?  If we want to add another test to this file, we may not want this 
Tracer object.   JUnit test files with global state are annoying to extend.

> TraceRunnable and TraceCallable should pull description from child thread 
> instead of parent
> -------------------------------------------------------------------------------------------
>
>                 Key: HTRACE-355
>                 URL: https://issues.apache.org/jira/browse/HTRACE-355
>             Project: HTrace
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.0
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>         Attachments: HTRACE-355.patch.txt
>
>
> If a TraceRunnable or TraceCallable is passed a null scope name, then it will 
> set the description to the current thread's name, which happens to be the 
> parent thread. It would be much more useful to set the description to the 
> child thread's name.
> A nice side effect of this change is that we can add a version of 
> {{tracer.newTraceExecutor}} that doesn't need to take a description for use 
> by applications that take great care to name their threads in an informative 
> manner.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to