GG-12609: Fixed OOM at initiator during LIST Signed-off-by: Andrey Gura <[email protected]>
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 <[email protected]> Authored: Sat Aug 26 17:01:46 2017 +0300 Committer: Andrey Gura <[email protected]> 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(); + } }
