From 1033249f0c971ea099ccbce6d9fe3cd720c7c800 Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 13 Jul 2011 01:46:22 +0300 Subject: [PATCH] Native (java) process memory leak, closes #1118. --- .../monitor/jvm/JvmMonitorService.java | 4 +- .../elasticsearch/monitor/jvm/JvmStats.java | 50 +++++++++++-------- .../test/stress/leaks/GenericStatsLeak.java | 46 +++++++++++++++++ .../test/stress/leaks/JvmStatsLeak.java | 35 +++++++++++++ 4 files changed, 114 insertions(+), 21 deletions(-) create mode 100644 modules/test/integration/src/test/java/org/elasticsearch/test/stress/leaks/GenericStatsLeak.java create mode 100644 modules/test/integration/src/test/java/org/elasticsearch/test/stress/leaks/JvmStatsLeak.java diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java index 9ff254f970e..cb64800cb30 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmMonitorService.java @@ -61,9 +61,11 @@ public class JvmMonitorService extends AbstractLifecycleComponent