Skip to content

Commit 30f6a17

Browse files
chaijunjie0101Apache9
authored andcommitted
HBASE-27282 CME in AuthManager causes region server crash (#4684)
Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit d664162)
1 parent 6e82a26 commit 30f6a17

File tree

1 file changed

+1
-2
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/security/access

1 file changed

+1
-2
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AuthManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import java.io.IOException;
2121
import java.util.HashMap;
22-
import java.util.HashSet;
2322
import java.util.List;
2423
import java.util.Map;
2524
import java.util.Set;
@@ -66,7 +65,7 @@ private static class PermissionCache<T extends Permission> {
6665

6766
void put(String name, T perm) {
6867
synchronized (mutex) {
69-
Set<T> perms = cache.getOrDefault(name, new HashSet<>());
68+
Set<T> perms = cache.getOrDefault(name, ConcurrentHashMap.newKeySet());
7069
perms.add(perm);
7170
cache.put(name, perms);
7271
}

0 commit comments

Comments
 (0)