You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/01/30 05:38:25 UTC

[GitHub] ravipesala commented on a change in pull request #3118: [CARBONDATA-3281] limit the LRU cache size

ravipesala commented on a change in pull request #3118: [CARBONDATA-3281] limit the LRU cache size
URL: https://github.com/apache/carbondata/pull/3118#discussion_r252122155
 
 

 ##########
 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:
   I feel it is better to consider only 60%  of max memory instead of considering 100%. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services