[jira] [Commented] (LANG-1230) Remove unnecessary synchronization from registry lookup in EqualsBuilder and HashCodeBuilder
[ https://issues.apache.org/jira/browse/LANG-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15429810#comment-15429810 ] ASF GitHub Bot commented on LANG-1230: -- Github user PascalSchumacher commented on the issue: https://github.com/apache/commons-lang/pull/143 Thanks! > Remove unnecessary synchronization from registry lookup in EqualsBuilder and > HashCodeBuilder > > > Key: LANG-1230 > URL: https://issues.apache.org/jira/browse/LANG-1230 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* >Affects Versions: 2.6 >Reporter: Philippe Marschall >Assignee: Pascal Schumacher > Fix For: 3.5 > > > We're running into contention issues in registry lookup in EqualsBuilder and > HashCodeBuilder. We believe the synchronization for the registry lookup is > unnecessary. ThreadLocals are thread safe, each thread gets own value. > Therefore no other thread can read or change the value of the current thread. > As a consequence access to ThreadLocals does not need to be synchronized. > Since IDKey uses object identity and the identity hashCode it does use > neither EqualsBuilder nor HashCodeBuilder. This means that recursive calls to > register and unregister are not possible even if the registered objects use > EqualsBuilder or HashCodeBuilder. This also makes re-reading redundant. > The issue was likely introduced in 2.5 by LANG-586 but 2.6 is the oldest > version we can select. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1230) Remove unnecessary synchronization from registry lookup in EqualsBuilder and HashCodeBuilder
[ https://issues.apache.org/jira/browse/LANG-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15429808#comment-15429808 ] ASF GitHub Bot commented on LANG-1230: -- Github user asfgit closed the pull request at: https://github.com/apache/commons-lang/pull/143 > Remove unnecessary synchronization from registry lookup in EqualsBuilder and > HashCodeBuilder > > > Key: LANG-1230 > URL: https://issues.apache.org/jira/browse/LANG-1230 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* >Affects Versions: 2.6 >Reporter: Philippe Marschall > Fix For: 3.5 > > > We're running into contention issues in registry lookup in EqualsBuilder and > HashCodeBuilder. We believe the synchronization for the registry lookup is > unnecessary. ThreadLocals are thread safe, each thread gets own value. > Therefore no other thread can read or change the value of the current thread. > As a consequence access to ThreadLocals does not need to be synchronized. > Since IDKey uses object identity and the identity hashCode it does use > neither EqualsBuilder nor HashCodeBuilder. This means that recursive calls to > register and unregister are not possible even if the registered objects use > EqualsBuilder or HashCodeBuilder. This also makes re-reading redundant. > The issue was likely introduced in 2.5 by LANG-586 but 2.6 is the oldest > version we can select. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1230) Remove unnecessary synchronization from registry lookup
[ https://issues.apache.org/jira/browse/LANG-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15315919#comment-15315919 ] Pascal Schumacher commented on LANG-1230: - [~garydgregory] It would be nice if you could take a look at the pull request. I do not feel confident enough in this area to judge whether to merge it or not. Thanks! > Remove unnecessary synchronization from registry lookup > --- > > Key: LANG-1230 > URL: https://issues.apache.org/jira/browse/LANG-1230 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* >Affects Versions: 2.6 >Reporter: Philippe Marschall > > We're running into contention issues in registry lookup in EqualsBuilder and > HashCodeBuilder. We believe the synchronization for the registry lookup is > unnecessary. ThreadLocals are thread safe, each thread gets own value. > Therefore no other thread can read or change the value of the current thread. > As a consequence access to ThreadLocals does not need to be synchronized. > Since IDKey uses object identity and the identity hashCode it does use > neither EqualsBuilder nor HashCodeBuilder. This means that recursive calls to > register and unregister are not possible even if the registered objects use > EqualsBuilder or HashCodeBuilder. This also makes re-reading redundant. > The issue was likely introduced in 2.5 by LANG-586 but 2.6 is the oldest > version we can select. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1230) Remove unnecessary synchronization from registry lookup
[ https://issues.apache.org/jira/browse/LANG-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15284929#comment-15284929 ] Philippe Marschall commented on LANG-1230: -- Sure https://github.com/apache/commons-lang/pull/143 > Remove unnecessary synchronization from registry lookup > --- > > Key: LANG-1230 > URL: https://issues.apache.org/jira/browse/LANG-1230 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* >Affects Versions: 2.6 >Reporter: Philippe Marschall > > We're running into contention issues in registry lookup in EqualsBuilder and > HashCodeBuilder. We believe the synchronization for the registry lookup is > unnecessary. ThreadLocals are thread safe, each thread gets own value. > Therefore no other thread can read or change the value of the current thread. > As a consequence access to ThreadLocals does not need to be synchronized. > Since IDKey uses object identity and the identity hashCode it does use > neither EqualsBuilder nor HashCodeBuilder. This means that recursive calls to > register and unregister are not possible even if the registered objects use > EqualsBuilder or HashCodeBuilder. This also makes re-reading redundant. > The issue was likely introduced in 2.5 by LANG-586 but 2.6 is the oldest > version we can select. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1230) Remove unnecessary synchronization from registry lookup
[ https://issues.apache.org/jira/browse/LANG-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15284887#comment-15284887 ] Gary Gregory commented on LANG-1230: Can you please provide a patch to expedite things? > Remove unnecessary synchronization from registry lookup > --- > > Key: LANG-1230 > URL: https://issues.apache.org/jira/browse/LANG-1230 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* >Affects Versions: 2.6 >Reporter: Philippe Marschall > > We're running into contention issues in registry lookup in EqualsBuilder and > HashCodeBuilder. We believe the synchronization for the registry lookup is > unnecessary. ThreadLocals are thread safe, each thread gets own value. > Therefore no other thread can read or change the value of the current thread. > As a consequence access to ThreadLocals does not need to be synchronized. > Since IDKey uses object identity and the identity hashCode it does use > neither EqualsBuilder nor HashCodeBuilder. This means that recursive calls to > register and unregister are not possible even if the registered objects use > EqualsBuilder or HashCodeBuilder. This also makes re-reading redundant. > The issue was likely introduced in 2.5 by LANG-586 but 2.6 is the oldest > version we can select. -- This message was sent by Atlassian JIRA (v6.3.4#6332)