Skip to content

Commit

Permalink
HBASE-27282 CME in AuthManager causes region server crash (apache#4684)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit d664162)
  • Loading branch information
chaijunjie0101 authored and Apache9 committed Aug 9, 2022
1 parent 027165e commit ae8652c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -66,7 +65,7 @@ private static class PermissionCache<T extends Permission> {

void put(String name, T perm) {
synchronized (mutex) {
Set<T> perms = cache.getOrDefault(name, new HashSet<>());
Set<T> perms = cache.getOrDefault(name, ConcurrentHashMap.newKeySet());
perms.add(perm);
cache.put(name, perms);
}
Expand Down

0 comments on commit ae8652c

Please sign in to comment.