ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ag...@apache.org
Subject [03/16] ignite git commit: GG-12609: Fixed OOM at initiator during LIST
Date Tue, 29 Aug 2017 14:38:17 GMT
GG-12609: Fixed OOM at initiator during LIST

Signed-off-by: Andrey Gura <agura@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7ce00b13
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7ce00b13
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7ce00b13

Branch: refs/heads/master
Commit: 7ce00b13bfce1ca76431ba487a2b023952b748dc
Parents: 4564305
Author: Eduard Shangareev <eshangareev@gridgain.com>
Authored: Sat Aug 26 17:01:46 2017 +0300
Committer: Andrey Gura <agura@apache.org>
Committed: Tue Aug 29 17:32:04 2017 +0300

----------------------------------------------------------------------
 .../tcp/internal/TcpDiscoveryNode.java          | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7ce00b13/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
index 6882821..b2797a40 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
@@ -649,4 +649,24 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements
Cluste
     @Override public String toString() {
         return S.toString(TcpDiscoveryNode.class, this, "isClient", isClient());
     }
+
+    /**
+     * IMPORTANT!
+     * Only purpose of this constructor is creating node which contains only necessary data
to store on disc
+     * @param node to copy data from
+     */
+    public TcpDiscoveryNode(
+        ClusterNode node
+    ) {
+        this.id = node.id();
+        this.consistentId = node.consistentId();
+        this.addrs = node.addresses();
+        this.hostNames = node.hostNames();
+        this.order = node.order();
+        this.ver = node.version();
+        this.daemon = node.isDaemon();
+        this.clientRouterNodeId = node.isClient() ? node.id() : null;
+
+        attrs = Collections.emptyMap();
+    }
 }


Mime
View raw message