GG-12609: Fixed OOM at initiator during LIST

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

Branch: refs/heads/ignite-6181-1
Commit: 8c249b77533c95a4bef3d19ca583feb992322325
Parents: 85fd8ce
Author: Eduard Shangareev <[email protected]>
Authored: Sat Aug 26 17:01:46 2017 +0300
Committer: Ilya Lantukh <[email protected]>
Committed: Sat Aug 26 17:01:46 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/8c249b77/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();
+    }
 }

Reply via email to