[
https://issues.apache.org/jira/browse/IGNITE-4501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943297#comment-15943297
]
ASF GitHub Bot commented on IGNITE-4501:
----------------------------------------
GitHub user SharplEr opened a pull request:
https://github.com/apache/ignite/pull/1676
IGNITE-4501: Improvement of connection in a cluster of new node
Reopen that PR: https://github.com/apache/ignite/pull/1436
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SharplEr/ignite ignite-4501
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/1676.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1676
----
commit 0e7768224e8ae26797460e2b750d04979c49c92f
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-20T12:35:05Z
Add using CLUSTER_REGION_ID for ordering nodes in ring
commit c43894854a2bdcb5d39d92552f0e105c70a10198
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-20T12:35:53Z
Add tests for RegionNodeComparator
commit 5a7d5e395c00ab7e6eafa03ed29ae4eea754cbc1
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-20T12:44:28Z
Add test to suite
commit cdcda327773b61beb90539e7c11130906d0525dc
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-21T10:57:54Z
A little clean up code
commit 620be443f3ef7bd4730ba755fb4e110d8dcd4918
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-25T12:26:42Z
Change ordering inside nodes field, and add maxNode field to avoid using
old ordering. Add method variant of serverNodes method which return only
necessary part of ring. That make complexity of nextNode equals O(log n + k),
which better then O(n). n is number of nodes, k is number of client nodes.
commit b45bad8b5dcf9d3904805503b1c327d4a6686d60
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-25T13:03:27Z
Add filed to TcpDiscoveryNode for faster getting cluster_region_id
commit d9b68dd3cc4f546d73c475c7adf82ea797d851f2
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-27T15:01:38Z
Fix bug in RegionNodeComparator
commit f36f07da21ca51bf2585fb80b82239541a3a16d6
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-27T15:02:30Z
Cleanup code in RegionNodeComparatorTest
commit 145394cb5c10e5f1127071f1cb7957a3c1307a9d
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-27T15:09:55Z
Add catch NumberFormatException
commit eeaf244788bd957a2b8f1e3b33d00338072edde1
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-27T15:34:37Z
cleanup TcpDiscoveryNodesRing
commit a3431dec0103f815803af744ec3c75b7188c19fb
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T10:37:16Z
Code cleanup
commit a41ee660eb275714bd924dfae7bf01c3274300f1
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T11:58:26Z
Add @NotNull to RegionNodeComparator.compare
commit 8ebd887797cba7adf3ca08ea8af8ac43e29be221
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T12:06:09Z
Add @Nullable to TcpDiscoveryNode.getClusterRegionId
commit fd91a18a421e951638c9f9078c34169916adde5e
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T12:07:57Z
cleanup
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
commit f4652c888d07c1f52945c801be3e220d55895860
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T16:31:44Z
Remove using cast to Nubmer
commit 6a3ac2eccd7a01bfde73def424f94d80da0c75c1
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T16:37:20Z
restore code format
commit ecb82ffd908cf3de8618c8d557d4077f9341e3cc
Author: Alexander Menshikov <[email protected]>
Date: 2017-01-30T16:45:14Z
restore code format2
commit 2e3ec7797327d722160bdee1b0803508ce9b4058
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-01T17:55:24Z
fix reusing variable
commit 77055549e20248c0f22eefc43e839ba82a3f3ecc
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-01T17:57:55Z
Fix lost regionId after deserialization
commit 30d3cd992d0c4cf76b2b368c7a336863eb3b5e2d
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-01T17:58:57Z
Add test for save sorting
commit 3e204be6d14d356d6cda6c11f2cd8d730348f44d
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-02T11:25:24Z
Add RegionTcpDiscoverySelfTest
commit f1bdd6c936f7feae2535ab3f4dae8dddc9a4cde0
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-02T11:31:08Z
Add license
commit 5e9343b96ecdcf25f0bdabf7468a2bd503ec7773
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-03T11:51:37Z
Add RegionTcpDiscoverySelfTest to suite
commit 907facf0658e7e69c3b70d81bdf340b5ce62b890
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-03T13:31:18Z
Remove maxNode
commit 33b8700401756b1c48ebe1ab5035ea3861feed5a
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-03T14:48:28Z
Merge RegionTcpDiscoverySelfTest and TcpDiscoverySelfTest
commit 951d8389cf0293aa680ea495b5a946d898ee76e5
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-06T10:13:19Z
Hmm, i think i has added it before.
commit 9d2b6bb5509ee1f9334cdb987df1d6e3f3eece88
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-06T13:42:41Z
Add logic for using old behavior while old nodes still in topology
commit c3a6270b0fee0e9b95fd0f9a6743c826e7ce9d92
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-06T15:03:30Z
Remove Java 8 methods like List.sort()
commit 1951e4f6396df91ba6dd9c868bb38f9a5d444229
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-06T15:19:09Z
Cleanup code in TcpDiscoveryNodesRing
commit 5515d0564a87c3e1120541326f7db4f8cf2aa6f7
Author: Alexander Menshikov <[email protected]>
Date: 2017-02-06T15:25:05Z
format code
----
> Improvement of connection in a cluster of new node
> --------------------------------------------------
>
> Key: IGNITE-4501
> URL: https://issues.apache.org/jira/browse/IGNITE-4501
> Project: Ignite
> Issue Type: Improvement
> Components: messaging
> Affects Versions: 1.8
> Reporter: Vyacheslav Daradur
> Assignee: Alexander Menshikov
> Fix For: 2.0
>
>
> h3. Main description:
> Cluster nodes connect a ring.
> For example: we have 6 nodes: A, B, C, D, E, F.
> They can connect a ring in any possible way: A-B-C-D-E-F-A, or A-F-B-E-C-D-A,
> etc.
> If some node leaves topology, adjacent nodes must reconnect.
> If nodes A, B, C are in same physical place, nodes D, E, F are in other
> place, and places lost connect each other, we will have many ways of
> reconnections.
> At best case, if we had a ring: A-B-CxD-E-FxA ('x' means disconnect) -- then
> we have only one reconnect (C
> will be connected to A or F will be connected to D -- depends on what part of
> the cluster was alive.
> Also, if we had a not ring: AxFxBxExCxDxA -- then we have a lot of
> reconnections (A to B, B to C, C to A -- in general n/2 reconnections, where
> n -- number of nodes).
> h3. Approach:
> It is necessary to develop approach of node insertion to the correct place
> for creation of the correct ring-topology.
> h3. Solutions:
> Main idea is a sorting according to latency.
> * group nodes in arcs on an ARC_ID. (manualy?)
> * implement NodeComparator (nodes on the same host : nodes on the same subnet
> : other nodes). We will use it when we connect a new node.
> * [dev list
> thread|http://mail-archives.apache.org/mod_mbox/ignite-dev/201612.mbox/%3CCAN+WSNyWYXSXEBpGErVt72zTgi2pTQzUWLv8JY=ke83-5-r...@mail.gmail.com%3E]
> Update Dec, 29 Yakov Zhdanov:
> # introduce CLUSTER_REGION_ID node attribute. This can be done by adding
> public static final constant to TcpDiscoverySpi.
> # Alter
> org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNodesRing#nextNode(java.util.Collection<org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode>)
> to order basing on per node attribute value
> # Node comparison should be stable and consistent. E.g. if CLUSTER_REGION_IDs
> are equal then we should compare nodes' IDs. This way we have consistent
> order on all nodes in topology.
> # Also nextNode() has to group nodes on same host and in same subnet. This
> can be postponed and implemented after we have other points done.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)