Darrel Schneider created GEODE-10158: ----------------------------------------
Summary: offheap can incorrectly disable or enable the query monitor Key: GEODE-10158 URL: https://issues.apache.org/jira/browse/GEODE-10158 Project: Geode Issue Type: Bug Components: offheap, querying Reporter: Darrel Schneider Geode has a QueryMonitor that should be disabled if the resource manager's critical-heap-threshold is 0 and enabled if it is > 0. But critical-offheap-threshold tries to also disable and enable the QueryMonitor. I think this is wrong since queries do not consume off-heap memory. QueryMonitor's relationship with the ResourceManager should only care about the critical-heap-threshold. The biggest risk is that this bug could cause the QueryMonitor to be disabled even though critical-heap-threshold is > 0. This would allow queries to consume heap memory when instead they should have failed with a LowMemoryException. To workaround this issue make sure that if you are using offheap that you either leave both critical thresholds set to 0 or set both of them to a non-zero value. A simple fix for this exists. Delete this one line from OffHeapMemoryMonitor: cache.setQueryMonitorRequiredForResourceManager(criticalThreshold != 0); A better fix would be to remove the InternalCache.setQueryMonitorRequiredForResourceManager method and instead have GemFireCacheImpl.getQueryMonitor method ask it's InternalResourceManager if it requires a QueryMonitor. -- This message was sent by Atlassian Jira (v8.20.1#820001)