ignite-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/IGNITE-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vladimir Ozerov closed IGNITE-2513.
-----------------------------------

> 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
>
>
> *Problem*
> 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
garbage.
> *Solution*
> 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
(v6.3.4#6332)

Mime
View raw message