daijyc commented on a change in pull request #662: Hive-21787: Metastore table 
cache enhancement
URL: https://github.com/apache/hive/pull/662#discussion_r291863754
 
 

 ##########
 File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java
 ##########
 @@ -79,17 +92,21 @@
   private AtomicBoolean isDatabaseCacheDirty = new AtomicBoolean(false);
 
   // For caching TableWrapper objects. Key is aggregate of database name and 
table name
-  private Map<String, TableWrapper> tableCache = new TreeMap<>();
+  private ReentrantReadWriteLock tableCacheRWLock = new 
ReentrantReadWriteLock(true);
 
 Review comment:
   Is this a global lock? Why we need another one in addition to cacheLock?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to