hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Junping Du (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9980) LightWeightGSet's modification field should be volatile so that detect changes by other thread in iteration.
Date Fri, 27 Sep 2013 03:23:05 GMT

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

Junping Du commented on HADOOP-9980:
------------------------------------

Hi [~cnauroth], thanks for your comments and your reference here. In my understanding, this
is a trade-off between either to remove volatile on modification (getting rid of wrong expectation)
or to add atomic increment (improving visibility of modification between threads) there, and
most of us prefer the former choice. Isn't it? Is so, shall we remove the volatile on modification
on LightWeightHashSet and LightWeightLinkedSet? If so, I will rename this JIRA to get rid
of volatile in LWHSet and LWLSet and deliver a patch soon. How does it sounds like?
                
> LightWeightGSet's modification field should be volatile so that detect changes by other
thread in iteration.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9980
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9980
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.3.0
>
>         Attachments: HADOOP-9980.patch
>
>
> LightWeightGSet should have a volatile modification field (like: LightWeightHashSet or
LightWeightLinkedSet) that is used to detect updates while iterating so they can throw a ConcurrentModificationException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message