accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3866) TraceScope not closed
Date Thu, 28 May 2015 23:52:17 GMT

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

Josh Elser commented on ACCUMULO-3866:
--------------------------------------

Nevermind, setting a {{null}} span results in close() being a no-op. I will add the close()
just to make the static analysis tools happy in the future (and to prevent future problems
if the implementation changes)

> TraceScope not closed
> ---------------------
>
>                 Key: ACCUMULO-3866
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3866
>             Project: Accumulo
>          Issue Type: Bug
>          Components: trace
>    Affects Versions: 1.7.0
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Minor
>              Labels: coverity
>             Fix For: 1.7.1, 1.8.0
>
>
> Two cases in which {{TraceScope}} is returned but never closed (it implements {{Closeable}}.
> {panel:title=core/.../Trace.java}
> {code}
>   public static void off() {
>     org.apache.htrace.Span span = org.apache.htrace.Trace.currentSpan();
>     if (span != null) {
>       span.stop();
>       org.apache.htrace.Tracer.getInstance().continueSpan(null);
>     }
>   }
> {code}
> {panel}
> {panel:title=trace/.../Trace.java}
> {code}
>   public static void endThread(Span span) {
>     if (span != null) {
>       span.stop();
>       org.apache.htrace.Tracer.getInstance().continueSpan(null);
>     }
>   }
> {code}
> {panel}
> [~billie.rinaldi] do you know if there's a reason that these aren't getting closed or
is it just a bug?



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

Mime
View raw message