jerqi commented on code in PR #4127:
URL: https://github.com/apache/gravitino/pull/4127#discussion_r1677364926
##########
core/src/main/java/com/datastrato/gravitino/authorization/AccessControlManager.java:
##########
@@ -34,27 +35,22 @@
import java.util.Map;
/**
- * AccessControlManager is used for manage users, roles, admin, grant
information, this class is an
- * entrance class for tenant management. This lock policy about this is as
follows: First, admin
- * operations are prevented by one lock. Then, other operations are prevented
by the other lock. For
- * non-admin operations, Apache Gravitino doesn't choose metalake level lock.
There are some reasons
- * mainly: First, the metalake can be renamed by users. It's hard to maintain
a map with metalake as
- * the key. Second, the lock will be couped with life cycle of the metalake.
+ * AccessControlManager is used for manage users, roles, grant information,
this class is an
+ * entrance class for tenant management. The operations will be protected by
one lock.
*/
public class AccessControlManager {
private final UserGroupManager userGroupManager;
- private final AdminManager adminManager;
private final RoleManager roleManager;
private final PermissionManager permissionManager;
- private final Object adminOperationLock = new Object();
- private final Object nonAdminOperationLock = new Object();
+ private final Object operationLock = new Object();
Review Comment:
I changed the lock to treeLock.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]