Skip to content

Commit

Permalink
HBASE-27282 CME in AuthManager causes region server crash (#4684)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
chaijunjie0101 authored Aug 9, 2022
1 parent b431652 commit d664162
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 d664162

Please sign in to comment.