You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by al...@apache.org on 2023/12/14 08:06:46 UTC
(ignite-extensions) branch master updated: IGNITE-21082 Fix excessive memory usage by performance statistics QueryHandler - Fixes #249.
This is an automated email from the ASF dual-hosted git repository.
alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git
The following commit(s) were added to refs/heads/master by this push:
new 209169d1 IGNITE-21082 Fix excessive memory usage by performance statistics QueryHandler - Fixes #249.
209169d1 is described below
commit 209169d17d7b46566332d99b30c047b688250b91
Author: Aleksey Plekhanov <pl...@gmail.com>
AuthorDate: Thu Dec 14 11:05:07 2023 +0300
IGNITE-21082 Fix excessive memory usage by performance statistics QueryHandler - Fixes #249.
Signed-off-by: Aleksey Plekhanov <pl...@gmail.com>
---
.../internal/performancestatistics/handlers/QueryHandler.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
index 5153b734..d702772d 100644
--- a/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
+++ b/modules/performance-statistics-ext/src/main/java/org/apache/ignite/internal/performancestatistics/handlers/QueryHandler.java
@@ -142,7 +142,7 @@ public class QueryHandler implements IgnitePerformanceStatisticsHandler {
Map<String, long[]> actions = rowsById.computeIfAbsent(qryNodeId, node -> new HashMap<>())
.computeIfAbsent(id, qryId -> new HashMap<>());
- long[] rowsArr = actions.computeIfAbsent(action, act -> new long[] {0});
+ long[] rowsArr = actions.computeIfAbsent(action.intern(), act -> new long[] {0});
rowsArr[0] += rows;
}
@@ -159,7 +159,10 @@ public class QueryHandler implements IgnitePerformanceStatisticsHandler {
Map<String, T3<String, String, long[]>> props = propsById.computeIfAbsent(qryNodeId, node -> new HashMap<>())
.computeIfAbsent(id, qryId -> new HashMap<>());
- T3<String, String, long[]> prop = props.computeIfAbsent(name + '=' + val, nv -> new T3<>(name, val, new long[] {0}));
+ String key = (name + '=' + val).intern();
+
+ T3<String, String, long[]> prop = props.computeIfAbsent(key,
+ nv -> new T3<>(name.intern(), val.intern(), new long[] {0}));
prop.get3()[0]++;
}