belugabehr commented on a change in pull request #2312:
URL: https://github.com/apache/hive/pull/2312#discussion_r639712397



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
##########
@@ -355,7 +349,9 @@ public boolean waitForValidStatus() {
   private long maxCacheSize;
   private long maxEntrySize;
   private long maxEntryLifetime;
-  private ReadWriteLock rwLock = new ReentrantReadWriteLock();
+  private final ReadWriteLock cacheLock = new ReentrantReadWriteLock();
+  private final Lock cacheReadLock = cacheLock.readLock();
+  private final Lock cacheWriteLock = cacheLock.writeLock();

Review comment:
       Breakout the `cacheLock` into its parts.  Simplifies code that relies on 
them.




-- 
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]



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

Reply via email to