You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/01/08 01:03:53 UTC

[jira] [Created] (HBASE-10294) Some synchronization on ServerManager#onlineServers can be removed

Ted Yu created HBASE-10294:
------------------------------

             Summary: 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
            Priority: Minor


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}



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