Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10158

offheap can incorrectly disable or enable the query monitor

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              dschneider Darrel Schneider
              dschneider Darrel Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: