logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Svensson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-148) ThreadContext uses LocalDataStore to store ThreadSpecific data instead should be using [ThreadStatic] variables.
Date Tue, 01 May 2012 11:29:52 GMT

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

Simon Svensson commented on LOG4NET-148:
----------------------------------------

Yes, it seems correct, except for some indenting issues.
                
> ThreadContext uses LocalDataStore to store ThreadSpecific data instead should be using
 [ThreadStatic] variables.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-148
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-148
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.9, 1.2.10
>         Environment: .Net Framework
>            Reporter: Hernando Torres-Rocca
>            Assignee: Ron Grabowski
>            Priority: Critical
>             Fix For: 1.2 Maintenance Release
>
>         Attachments: ThreadContextProperties.cs
>
>
> According to this article (http://blogs.msdn.com/junfeng/archive/2005/12/31/508423.aspx)
and production issues encountered: using LocalDataStore is not a scalable approach for any
web server that gets a significant amount of traffic.
> The ThreadContext object should be modified to use [ThreadStatic] variables.
> From the article:
> The Whidbey RTM implementation of Thread.GetData/Thread.SetData has several scalability
issues caused by global locks being taken. The appdomain-global lock taken in LocalDataStore.SetData
is one of them. There is another global lock taken in ThreadNative::GetDomainLocalStore that
is even worse since it is process-global.
> The best workaround is to use [ThreadStatic] variables instead of Thread.GetData/Thread.SetData

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message