Fix GEODE-154: HDFS region with HeapLRU reports LowMemoryExceptions
    even when region size is less then the eviction threshold

    - calling setUsageThreshold() on MemoryPoolMXBean resulted in
    it reporting incorrect memory usage causing temporary spikes.
    Since we already set CollectionThreshold at 1 byte and also have a
    stat and heap poller thread, we now skip setting the usage threshold.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/88ed3ed5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/88ed3ed5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/88ed3ed5

Branch: refs/heads/feature/GEODE-137
Commit: 88ed3ed59b96f8ce84327ed2bad132d4dc6e3a51
Parents: 389e2a8
Author: Namrata Thanvi <ntha...@pivotal.io>
Authored: Thu Aug 6 14:22:53 2015 +0530
Committer: Qihong Chen <qc...@pivotal.io>
Committed: Thu Aug 6 10:07:48 2015 -0700

----------------------------------------------------------------------
 .../internal/cache/control/HeapMemoryMonitor.java      | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/88ed3ed5/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git 
a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
 
b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
index 8346245..fda337b 100644
--- 
a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
+++ 
b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
@@ -554,18 +554,7 @@ public void stopMonitoring() {
    *          Number of bytes of heap memory currently used.
    */
   private void setUsageThresholdOnMXBean(final long bytesUsed) {
-    if (testDisableMemoryUpdates) {
-      return;
-    }
-    
-    final MemoryPoolMXBean memoryPoolMXBean = getTenuredMemoryPoolMXBean();
-    final MemoryThresholds saveThresholds = this.thresholds;
-
-    if (bytesUsed < saveThresholds.getEvictionThresholdBytes()) {
-      
memoryPoolMXBean.setUsageThreshold(saveThresholds.getEvictionThresholdBytes());
-    } else {
-      
memoryPoolMXBean.setUsageThreshold(saveThresholds.getCriticalThresholdBytes());
-    }
+         //// this method has been made a no-op to fix bug 49064 
   }
   
   /**

Reply via email to