sunxiaojian commented on code in PR #7300:
URL: https://github.com/apache/gravitino/pull/7300#discussion_r2115210840


##########
authorizations/authorization-common/src/main/java/org/apache/gravitino/authorization/jdbc/JdbcAuthorizationPlugin.java:
##########
@@ -117,13 +117,15 @@ public Boolean onMetadataUpdated(MetadataObjectChange... 
changes) throws Runtime
   @Override
   public Boolean onRoleCreated(Role role) throws AuthorizationPluginException {
     List<String> sqls = getCreateRoleSQL(role.name());
-    boolean createdNewly = false;
+    boolean createdNewly = true;
     for (String sql : sqls) {
-      createdNewly = executeUpdateSQL(sql, "already exists");
+      if (!executeUpdateSQL(sql, "already exists")) {
+        createdNewly = false;
+      }
     }
 
     if (!createdNewly) {
-      return true;
+      return false;

Review Comment:
   fixed



-- 
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]

Reply via email to