hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10294) Some synchronization on ServerManager#onlineServers can be removed
Date Tue, 14 Jan 2014 17:02:50 GMT

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

stack commented on HBASE-10294:

bq. To see if I understand clearly, synchronization is needed w.r.t. accessing onlineServers.
If so, I will put up a new patch.

I would suggest you just undo this patch.  Given the above admission, you do not understand
clearly what is going on here and yet you are trying to do more 'fixes' in this space that
as far as I can tell is not in need of fixing (You do not answer my question of why you are
making this change).

Not sure why you comment when this was added?  What point are you making?

If you need something to work on, just ask.  It seems like you are just doing random reading
fixing random stuff consuming the time of reviewers who need to keep an eye on you in case
you break anything (as could be the case here) and worse, once you have our attention, you
want more review still -- and all for 'minor' issues.

> 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
>             Fix For: 0.99.0
>         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

View raw message