hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chia-Ping Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7326) SortedCopyOnWriteSet is not thread safe due to leaked TreeSet implementations
Date Sun, 02 Apr 2017 01:24:41 GMT

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

Chia-Ping Tsai commented on HBASE-7326:
---------------------------------------

SortedCopyOnWriteSet had been removed in 2.0.0 (see HBASE-17809). We should close this jira.

> SortedCopyOnWriteSet is not thread safe due to leaked TreeSet implementations
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-7326
>                 URL: https://issues.apache.org/jira/browse/HBASE-7326
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.92.2, 0.94.3, 0.95.2
>            Reporter: Gary Helmling
>
> The SortedCopyOnWriteSet implementation uses an internal TreeSet that is copied and replaced
on mutation operations.  However, in a few areas, SortedCopyOnWriteSet leaks references to
the underlying TreeSet implementations, allowing for unsafe usage:
> * iterator()
> * subSet()
> * headSet()
> * tailSet()
> For Iterator.remove(), we can wrap in an implementation that throws UnsupportedOperationException.
 For the sub set methods, we could return new SortedCopyOnWriteSet instances (which would
not modify the parent set), or wrap with a new sub set implementation that safely allows modification
of the parent set.
> To be clear, the current usage of SortedCopyOnWriteSet does not make use of any of these
non-thread-safe methods, but the implementation should be fixed to be completely thread safe
and prevent any new issues.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message