[
https://issues.apache.org/jira/browse/HBASE-11740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097585#comment-14097585
]
Virag Kothari commented on HBASE-11740:
---------------------------------------
bq. If the original is changed, will the unmodifiable Map get some exception if
it is in the middle of iteration?
Yes, that will be an issue. Probably, we can do the unmodifiableMap for
RegionStates.getRegionAssignments() as it called only during startup. We can
keep the clone() as is for RegionSTates.getRegionsInTransition() as that is
accessed by other threads. Also regionsInTransition.clone() is inexpensive as
it is just a hashmap. Thoughts?
> RegionStates.getRegionAssignments() gets stuck on clone
> -------------------------------------------------------
>
> Key: HBASE-11740
> URL: https://issues.apache.org/jira/browse/HBASE-11740
> Project: HBase
> Issue Type: Bug
> Components: Region Assignment
> Reporter: Virag Kothari
> Assignee: Virag Kothari
> Attachments: HBASE-11740.patch
>
>
> This happens in processDeadServersAndRegionsInTransition() on Master startup.
> RegionAssigments is a tree map and TreeMap.clone() is expensive as it builds
> a tree from sorted data (Order of n). There were a million entries in
> RegionAssigments and from jstack, thread was stuck in
> TreeMap.buildFromSorted() for couple of hours.
> Instead of this shadow clone, wrapping as an unmodifiable Map should be
> enough.
--
This message was sent by Atlassian JIRA
(v6.2#6252)