MarvinLitt commented on a change in pull request #3118: [CARBONDATA-3281] limit the LRU cache size
URL:
https://github.com/apache/carbondata/pull/3118#discussion_r253286542
##########
File path: core/src/main/java/org/apache/carbondata/core/cache/CarbonLRUCache.java
##########
@@ -305,4 +312,15 @@ public void clear() {
lruCacheMap.clear();
}
}
+
+ /**
+ * Check if LRU cache setting is bigger than max memory of jvm.
+ * if LRU cache is bigger than max memory of jvm when query for a big segments table,may cause JDBC server crash.
+ * @return true LRU cache is bigger than max memory of jvm, false otherwise
+ */
+ private boolean isBeyondMaxMemory(){
+ long mSize = Runtime.getRuntime().maxMemory();
+ long lruSize = lruCacheMemorySize * 1024 * 1024;
Review comment:
ok
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]
With regards,
Apache Git Services