hdygxsj commented on code in PR #8102:
URL: https://github.com/apache/gravitino/pull/8102#discussion_r2335733719
##########
server-common/src/main/java/org/apache/gravitino/server/authorization/jcasbin/JcasbinAuthorizer.java:
##########
@@ -76,6 +81,21 @@ 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 static Executor executor =
+ Executors.newFixedThreadPool(
+ 50,
Review Comment:
> 50 is not a nice number. Please use the CPU cores to set it exactly.
This is an I/O-intensive task, with most of the time spent on database
queries. I think it would be best to set it as large as the JDBC connection
pool to achieve better concurrency performance.
--
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]