Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
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.
Attachments
Issue Links
- links to