This is an automated email from the ASF dual-hosted git repository.
hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 972ba6f8ed [VL] Fix memory leak caused by hard references on keys of
TreeMemoryConsumers#FACTORIES (#11362)
972ba6f8ed is described below
commit 972ba6f8edbf4dd4e08edfb926a6b379d6509e6f
Author: Hongze Zhang <[email protected]>
AuthorDate: Tue Jan 6 17:28:31 2026 +0800
[VL] Fix memory leak caused by hard references on keys of
TreeMemoryConsumers#FACTORIES (#11362)
---
.../apache/gluten/memory/memtarget/spark/TreeMemoryConsumers.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/gluten-core/src/main/java/org/apache/gluten/memory/memtarget/spark/TreeMemoryConsumers.java
b/gluten-core/src/main/java/org/apache/gluten/memory/memtarget/spark/TreeMemoryConsumers.java
index 5207ce46a2..0c42ce966e 100644
---
a/gluten-core/src/main/java/org/apache/gluten/memory/memtarget/spark/TreeMemoryConsumers.java
+++
b/gluten-core/src/main/java/org/apache/gluten/memory/memtarget/spark/TreeMemoryConsumers.java
@@ -21,6 +21,7 @@ import org.apache.gluten.memory.memtarget.Spillers;
import org.apache.gluten.memory.memtarget.TreeMemoryTarget;
import com.google.common.base.Preconditions;
+import org.apache.commons.collections4.map.AbstractReferenceMap;
import org.apache.commons.collections4.map.ReferenceMap;
import org.apache.spark.memory.MemoryMode;
import org.apache.spark.memory.TaskMemoryManager;
@@ -31,7 +32,9 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public final class TreeMemoryConsumers {
- private static final ReferenceMap<TaskMemoryManager, Factory> FACTORIES =
new ReferenceMap<>();
+ private static final ReferenceMap<TaskMemoryManager, Factory> FACTORIES =
+ new ReferenceMap<>(
+ AbstractReferenceMap.ReferenceStrength.WEAK,
AbstractReferenceMap.ReferenceStrength.WEAK);
private TreeMemoryConsumers() {}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]