[
https://issues.apache.org/jira/browse/HBASE-11290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14132092#comment-14132092
]
Mikhail Antonov commented on HBASE-11290:
-----------------------------------------
[~virag], that's pretty good. A few thoughts / questions..(just skimmed the
patch, may be missed something)
- LockFreeCache name implies that it's "cache (i.e. structure from where
elements could be evicted without any harm when expired or cache is overfilled)
which is lock free", which isn't exactly how it's used? I mean - the class
itself is suited to serve as a set of named lock objects, and it can't
arbitrarily evict elements from it?
- to be precise, not just setters updating multiple collections grab region
lock, but readers who want to read consistently from several ones, right? Like
isRegionOnline()? Also this list could contain RW-locks, right? As further
improvements. Now guys like #isRegionOnline() can't run in parallel querying
about the same region from multiple threads, although they could with RW lock.
- for ops like #regionOnline(), does it make sense to have the server-keyed
locks, and operations involving both HRI and server (hence needed to
access/update serverHoldings) would first grab lock for HRI, then lock for
ServerName to work with server holdings? Seems more consistent?
- #logSplit made not synchronized now, we don't need locks to iterate over
lastAssignments map or to access processedServers?
- in #serverOffline do we still need notifyAll call at the last lines?
> Unlock RegionStates
> -------------------
>
> Key: HBASE-11290
> URL: https://issues.apache.org/jira/browse/HBASE-11290
> Project: HBase
> Issue Type: Sub-task
> Reporter: Francis Liu
> Assignee: Virag Kothari
> Attachments: HBASE-11290-0.98.patch, HBASE-11290.draft.patch
>
>
> Even though RegionStates is a highly accessed data structure in HMaster. Most
> of it's methods are synchronized. Which limits concurrency. Even simply
> making some of the getters non-synchronized by using concurrent data
> structures has helped with region assignments. We can go as simple as this
> approach or create locks per region or a bucket lock per region bucket.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)