ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-2513) Review ThreadLocal.remove() usages.
Date Mon, 01 Feb 2016 07:55:39 GMT
Vladimir Ozerov created IGNITE-2513:

             Summary: Review ThreadLocal.remove() usages.
                 Key: IGNITE-2513
                 URL: https://issues.apache.org/jira/browse/IGNITE-2513
             Project: Ignite
          Issue Type: Sub-task
          Components: general
    Affects Versions: 1.5.0.final
            Reporter: Vladimir Ozerov
            Assignee: Vladimir Ozerov
            Priority: Critical
             Fix For: 1.6

We have lots scenarios when TL.set(...) is accompanied with TL.remove(). Once TL entry is
removed, next set(...) invocation will cause creation of new inner entries, thus generating

Use TL.set(null) instead of TL.remove(). 
*CAUTION!* This applies only to static TLs and TLs on rarely created objects (e.g. contexts).
This optimization should not be applied to non-static TLs of frequently created objects because
it will lead to excessive grow of internal TL map.

This message was sent by Atlassian JIRA

View raw message