hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-10294) Some synchronization on ServerManager#onlineServers can be removed
Date Fri, 10 Jan 2014 17:39:12 GMT

     [ https://issues.apache.org/jira/browse/HBASE-10294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated HBASE-10294:
---------------------------

    Status: Patch Available  (was: Open)

> Some synchronization on ServerManager#onlineServers can be removed
> ------------------------------------------------------------------
>
>                 Key: HBASE-10294
>                 URL: https://issues.apache.org/jira/browse/HBASE-10294
>             Project: HBase
>          Issue Type: Task
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Minor
>         Attachments: 10294-v1.txt
>
>
> ServerManager#onlineServers is a ConcurrentHashMap
> Yet I found that some accesses to it are synchronized and unnecessary.
> Here is one example:
> {code}
>   public Map<ServerName, ServerLoad> getOnlineServers() {
>     // Presumption is that iterating the returned Map is OK.
>     synchronized (this.onlineServers) {
>       return Collections.unmodifiableMap(this.onlineServers);
> {code}
> Note: not all accesses to ServerManager#onlineServers are synchronized.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message