nandakumar131 commented on code in PR #6962:
URL: https://github.com/apache/ozone/pull/6962#discussion_r1703482009
##########
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, there are no parallel calls to `TableCache#put` method. What will
happen if someone makes a parallel put calls with same key? Will we end up in
inconsistent state here with `readLock`?
--
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]