mirror of https://github.com/apache/nifi.git
NIFI-13420 Maintain consistent maxNonHeapBytes for clustered diagnostics
- The merged value of maxNonHeapBytes should be -1 when at least one node has that value This closes #8983 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
a774ff8120
commit
d61b87bd9b
|
@ -688,7 +688,11 @@ public class StatusMerger {
|
|||
target.setFreeHeapBytes(target.getFreeHeapBytes() + toMerge.getFreeHeapBytes());
|
||||
target.setFreeNonHeapBytes(target.getFreeNonHeapBytes() + toMerge.getFreeNonHeapBytes());
|
||||
target.setMaxHeapBytes(target.getMaxHeapBytes() + toMerge.getMaxHeapBytes());
|
||||
if (target.getMaxNonHeapBytes() != -1 && toMerge.getMaxNonHeapBytes() != -1) {
|
||||
target.setMaxNonHeapBytes(target.getMaxNonHeapBytes() + toMerge.getMaxNonHeapBytes());
|
||||
} else {
|
||||
target.setMaxNonHeapBytes(-1L);
|
||||
}
|
||||
double systemLoad = target.getProcessorLoadAverage();
|
||||
double toMergeSystemLoad = toMerge.getProcessorLoadAverage();
|
||||
if (systemLoad >= 0 && toMergeSystemLoad >= 0) {
|
||||
|
|
Loading…
Reference in New Issue