jerryshao commented on code in PR #7354:
URL: https://github.com/apache/gravitino/pull/7354#discussion_r2141633661


##########
core/src/main/java/org/apache/gravitino/storage/relational/RelationalEntityStore.java:
##########
@@ -83,47 +106,91 @@ private static RelationalBackend 
createRelationalEntityBackend(Config config) {
   @Override
   public <E extends Entity & HasIdentifier> List<E> list(
       Namespace namespace, Class<E> type, Entity.EntityType entityType) throws 
IOException {
-    return backend.list(namespace, entityType, false);
+    return cache.withCacheLock(

Review Comment:
   I found that you have the lock in the cache, also you will have a lock in 
the entity store. I would suggest using only one lock here, no need to use lock 
in the cache, or use a different lock in here? The use of one lock in two 
different classes easily leads to race conditions.



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