Mark Bathori created NIFI-10974:
-----------------------------------

             Summary: Incorrect warning message on memory usage from 
MonitorMemory
                 Key: NIFI-10974
                 URL: https://issues.apache.org/jira/browse/NIFI-10974
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Mark Bathori
            Assignee: Mark Bathori


There are certain cases when the MonitorMemory reporting task is sending 
incorrect warning messages on memory usage crossing the threshold.

{+}Repro steps{+}:
 * In the MonitorMemory reporting task, set the threshold value to low enough 
that the current memory usage is crossing that value.
 * Restart NiFi while the monitoring task is still running.
 * After the restart set the threshold to higher value above the actual memory 
usage.
 * The warning messages will be still send despite the threshold is above the 
actual memory usage.

The main problem is that the *isCollectionUsageThresholdExceeded()* method call 
on *MemoryPoolMXBean* have a *gcSensor* registered at the VM that's 'on' 
attribute will get stuck on 'true' value. This will cause the method to always 
return with exceeded. The sensor will get reseted on the next garbage 
collection but until that it will send false messages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to