hdygxsj commented on code in PR #8102:
URL: https://github.com/apache/gravitino/pull/8102#discussion_r2336170217


##########
server-common/src/main/java/org/apache/gravitino/server/authorization/MetadataFilterHelper.java:
##########
@@ -214,4 +281,23 @@ private static boolean enableAuthorization() {
     Config config = GravitinoEnv.getInstance().config();
     return config != null && config.get(Configs.ENABLE_AUTHORIZATION);
   }
+
+  private static void checkExecutor() {
+    if (executor == null) {
+      synchronized (MetadataFilterHelper.class) {
+        if (executor == null) {
+          executor =
+              Executors.newFixedThreadPool(
+                  GravitinoEnv.getInstance()
+                      .config()
+                      
.get(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_MAX_CONNECTIONS),
+                  runnable -> {
+                    Thread thread = new Thread(runnable);

Review Comment:
   fixed



##########
server-common/src/main/java/org/apache/gravitino/server/authorization/jcasbin/JcasbinAuthorizer.java:
##########
@@ -76,8 +82,26 @@ public class JcasbinAuthorizer implements 
GravitinoAuthorizer {
    */
   private Set<Long> loadedRoles = ConcurrentHashMap.newKeySet();
 
+  /**
+   * loadedOwners is used to cache owners that have loaded permissions. When 
the permissions of a
+   * role are updated, they should be removed from it.
+   */
+  private Set<Long> loadedOwners = ConcurrentHashMap.newKeySet();
+
+  private Executor executor = null;
+
   @Override
   public void initialize() {
+    executor =
+        Executors.newFixedThreadPool(
+            GravitinoEnv.getInstance()
+                .config()
+                .get(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_MAX_CONNECTIONS),

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