You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "jerqi (via GitHub)" <gi...@apache.org> on 2026/01/21 11:38:23 UTC
[PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
jerqi opened a new pull request, #9773:
URL: https://github.com/apache/gravitino/pull/9773
### What changes were proposed in this pull request?
Move check metalake in use to server module
### Why are the changes needed?
This is a follow up PR to optimize the code to avoid redundant check
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2716050452
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
So, it seems that the segment lock with write permission can't work in the concurrent environment. We may need to
check whether this is by design or a bug when using the segment lock
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2719931642
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
Do we have similar issues in the cache 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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#issuecomment-3783365812
> What's the benefit of moving `checkMetalakeInUse` to the server module? Is it just to check the metalake early and fail fast?
We can reduce redundant metalake check. We will call access control manager in other code places. It will cause redundant check.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2716378464
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
Could u help me check this point?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2719466115
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
Please just go ahead, this part LGTM.
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
The segment lock can only guarantee that there will be only one thread amone all threads that have the same key and can access it, and will not prevent multiple threads with different keys from accessing it, which is the problem.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2719853173
##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -124,6 +125,11 @@ public static void checkCurrentUser(String metalake, String user) {
}
}
+ public static void checkMetalakeInUse(String metalake) {
Review Comment:
I would rather move this check method to `MetalakeManager` as it is all related to metalake operations.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2717646557
##########
core/src/main/java/org/apache/gravitino/authorization/UserGroupManager.java:
##########
@@ -105,18 +99,8 @@ boolean removeUser(String metalake, String user) {
User getUser(String metalake, String user) throws NoSuchUserException {
try {
- // Only check metalake existence, not enabled status, to allow reading user info
- // on disabled metalakes for internal operations like checkCurrentUser().
Review Comment:
`checkMetalakeInUse` will verify the metalake existence.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#issuecomment-3783359729
What's the benefit of moving `checkMetalakeInUse` to the server module? Is it just to check the metalake early and fail fast?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 merged PR #9773:
URL: https://github.com/apache/gravitino/pull/9773
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2716912028
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
I will take time on it.
##########
core/src/main/java/org/apache/gravitino/authorization/UserGroupManager.java:
##########
@@ -105,18 +99,8 @@ boolean removeUser(String metalake, String user) {
User getUser(String metalake, String user) throws NoSuchUserException {
try {
- // Only check metalake existence, not enabled status, to allow reading user info
- // on disabled metalakes for internal operations like checkCurrentUser().
Review Comment:
Why do we remove it? it appear that this change has nothing to do with `checkMetalakeInUse` logic.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2719869062
##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -124,6 +125,11 @@ public static void checkCurrentUser(String metalake, String user) {
}
}
+ public static void checkMetalakeInUse(String metalake) {
Review Comment:
OK, I will.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "danhuawang (via GitHub)" <gi...@apache.org>.
danhuawang commented on PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#issuecomment-3798017434
Verify passed.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2715886125
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
@yuqi1129 Could u check whether there are other concurrency issues about cache?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2716028002
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
No, it will throw an exception If we don't use ConcurrentMap here.
```
Method: POST
Status Code: 500
Exception: HTTP 500 Error
Request Body:
{
"name": "test_tb_4773653",
"location": "gs://strato-iceberg/IRCperform/dml24/test_tb_4773653",
"schema": {
"type": "struct",
"schema-id": 0,
"fields": [
{
"id": 1,
"name": "id",
"required": true,
"type": "int",
"write-default": 1
},
{
... (request body truncated)
Response Body:
{
"error": {
"message": "Failed to validate user",
"type": "RuntimeException",
"code": 500,
"stack": [
"java.lang.RuntimeException: Failed to validate user",
"\tat org.apache.gravitino.server.web.filter.BaseMetadataAuthorizationMethodInterceptor.invoke(BaseMetadataAuthorizationMethodInterceptor.java:147)",
"\tat org.jvnet.hk2.internal.MethodInterceptorHandler.invoke(MethodInterceptorHandler.java:97)",
"\tat org.apache.gravitino.iceberg.service.rest.IcebergTableOperations_$$_jvst68c_0.createTable(IcebergTableOperations_$$_jvst68c_0.java)",
"\tat jdk.internal.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)",
"\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
"\tat java.base/java.lang.reflect.Method.invoke(Method.java:569)",
"\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)",
"\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)",
"\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)",
"\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)",
"\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:292)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:274)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:244)",
"\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)",
"\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)",
"\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)",
"\tat org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)",
"\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)",
"\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)",
"\tat org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)",
"\tat org.apache.gravitino.server.authentication.AuthenticationFilter.lambda$doFilter$0(AuthenticationFilter.java:89)",
"\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:712)",
"\tat java.base/javax.security.auth.Subject.doAs(Subject.java:439)",
"\tat org.apache.gravitino.utils.PrincipalUtils.doAs(PrincipalUtils.java:44)",
"\tat org.apache.gravitino.server.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:86)",
"\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)",
"\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)",
"\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)",
"\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)",
"\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)",
"\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
"\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)",
"\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
"\tat org.eclipse.jetty.server.Server.handle(Server.java:516)",
"\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)",
"\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)",
"\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)",
"\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)",
"\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)",
"\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)",
"\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)",
"\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)",
"\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)",
"\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)",
"\tat java.base/java.lang.Thread.run(Thread.java:840)",
"Caused by: java.util.ConcurrentModificationException",
"\tat java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1221)",
"\tat org.apache.gravitino.cache.ReverseIndexCache.put(ReverseIndexCache.java:122)",
"\tat org.apache.gravitino.cache.ReverseIndexRules.lambda$static$0(ReverseIndexRules.java:57)",
"\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1511)",
"\tat org.apache.gravitino.cache.ReverseIndexRules.lambda$static$1(ReverseIndexRules.java:53)",
"\tat org.apache.gravitino.cache.ReverseIndexCache.indexEntity(ReverseIndexCache.java:161)",
"\tat org.apache.gravitino.cache.CaffeineEntityCache.syncEntitiesToCache(CaffeineEntityCache.java:384)",
"\tat org.apache.gravitino.cache.CaffeineEntityCache.lambda$put$13(CaffeineEntityCache.java:313)",
"\tat org.apache.gravitino.cache.SegmentedLock.withLock(SegmentedLock.java:89)",
"\tat org.apache.gravitino.cache.CaffeineEntityCache.put(CaffeineEntityCache.java:309)",
"\tat org.apache.gravitino.storage.relational.RelationalEntityStore.lambda$get$0(RelationalEntityStore.java:151)",
"\tat org.apache.gravitino.cache.SegmentedLock.withLockAndThrow(SegmentedLock.java:143)",
"\tat org.apache.gravitino.cache.CaffeineEntityCache.withCacheLock(CaffeineEntityCache.java:346)",
"\tat org.apache.gravitino.storage.relational.RelationalEntityStore.get(RelationalEntityStore.java:142)",
"\tat org.apache.gravitino.authorization.UserGroupManager.getUser(UserGroupManager.java:102)",
"\tat org.apache.gravitino.authorization.AccessControlManager.lambda$getUser$2(AccessControlManager.java:84)",
"\tat org.apache.gravitino.lock.TreeLockUtils.doWithTreeLock(TreeLockUtils.java:49)",
"\tat org.apache.gravitino.authorization.AccessControlManager.getUser(AccessControlManager.java:81)",
"\tat org.apache.gravitino.hook.AccessControlHookDispatcher.getUser(AccessControlHookDispatcher.java:78)",
"\tat org.apache.gravitino.listener.AccessControlEventDispatcher.getUser(AccessControlEventDispatcher.java:173)",
"\tat org.apache.gravitino.server.authorization.jcasbin.JcasbinAuthorizer.isMetalakeUser(JcasbinAuthorizer.java:230)",
"\tat org.apache.gravitino.authorization.AuthorizationUtils.checkCurrentUser(AuthorizationUtils.java:121)",
"\tat org.apache.gravitino.server.web.filter.BaseMetadataAuthorizationMethodInterceptor.invoke(BaseMetadataAuthorizationMethodInterceptor.java:133)",
"\t... 62 more"
]
}
}
```
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#9586][followup] improvement(authz): Move check metalake in use to server module [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #9773:
URL: https://github.com/apache/gravitino/pull/9773#discussion_r2716006451
##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexCache.java:
##########
@@ -72,7 +72,7 @@ public class ReverseIndexCache {
* or the data will be in the memory forever.
*/
private final Map<EntityCacheKey, List<EntityCacheKey>> entityToReverseIndexMap =
- Maps.newHashMap();
+ Maps.newConcurrentMap();
Review Comment:
The map is already guarded by `segmentedLock` in `CaffeineEntityCache`, I believe it's concurrently safe.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org