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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]