sumitagrawl commented on code in PR #6962:
URL: https://github.com/apache/ozone/pull/6962#discussion_r1703508957
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/cache/FullTableCache.java:
##########
@@ -111,18 +116,31 @@ public void loadInitial(CacheKey<KEY> key,
CacheValue<VALUE> value) {
@Override
public void put(CacheKey<KEY> cacheKey, CacheValue<VALUE> value) {
try {
- lock.writeLock().lock();
+ lock.readLock().lock();
Review Comment:
Currently no use case, but if someone do parallel call, the last one will
get updated as collection is concurrentSkipListMap and no corruption.
This is same case for PartialCacheTable where same logic, but no lock. Lock
purpose was eviction issue as reported in
[HDDS-4583](https://issues.apache.org/jira/browse/HDDS-4583) Jira where target
problem is mentioned. And hence this is not required.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]