yuqi1129 commented on code in PR #2873:
URL: https://github.com/apache/gravitino/pull/2873#discussion_r1955658840
##########
core/src/main/java/org/apache/gravitino/authorization/AccessControlManager.java:
##########
@@ -57,44 +61,68 @@ public AccessControlManager(EntityStore store, IdGenerator
idGenerator, Config c
@Override
public User addUser(String metalake, String user)
throws UserAlreadyExistsException, NoSuchMetalakeException {
- return userGroupManager.addUser(metalake, user);
+ return TreeLockUtils.doWithTreeLock(
+
NameIdentifier.of(AuthorizationUtils.ofGroupNamespace(metalake).levels()),
Review Comment:
The current code uses logic:
https://github.com/apache/gravitino/blob/300c79b00578b592cdc152c06c196bfb015b69e6/server/src/main/java/org/apache/gravitino/server/web/rest/UserOperations.java#L69-L88
https://github.com/apache/gravitino/blob/300c79b00578b592cdc152c06c196bfb015b69e6/server/src/main/java/org/apache/gravitino/server/web/rest/UserOperations.java#L120-L143
https://github.com/apache/gravitino/blob/300c79b00578b592cdc152c06c196bfb015b69e6/server/src/main/java/org/apache/gravitino/server/web/rest/UserOperations.java#L145-L169
@jerqi
Could you please help confirm it? It seems there are some problems with the
code.
--
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]