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 <[email protected]>
(cherry picked from commit d664162)
(cherry picked from commit ae8652c)
Change-Id: Ib2416a3c13f73e2caedeb8ee04eb8457688e23ac
  • Loading branch information
chaijunjie0101 authored and Apache9 committed Aug 9, 2022
1 parent c89c95a commit 97a101c
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 97a101c

Please sign in to comment.