HBASE-10294 ServerManager#onlineServers synchronization
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1558174 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1951d272a2
commit
405b51a0eb
|
@ -421,7 +421,9 @@ public class ServerManager {
|
|||
*/
|
||||
public Map<ServerName, ServerLoad> getOnlineServers() {
|
||||
// Presumption is that iterating the returned Map is OK.
|
||||
return Collections.unmodifiableMap(this.onlineServers);
|
||||
synchronized (this.onlineServers) {
|
||||
return Collections.unmodifiableMap(this.onlineServers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue