You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dm...@apache.org on 2020/11/19 00:16:44 UTC

[ignite] branch master updated: Fix. (#8448)

This is an automated email from the ASF dual-hosted git repository.

dmagda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new d3e5b7c  Fix. (#8448)
d3e5b7c is described below

commit d3e5b7c11ed037670700eea75851e619d5d1b6b1
Author: Vladsz83 <vl...@gmail.com>
AuthorDate: Thu Nov 19 03:16:31 2020 +0300

    Fix. (#8448)
---
 .../ignite/spi/discovery/tcp/TcpDiscoverySpi.java  | 23 +++++++++++-----------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 8a2b4c6..9837061 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -630,12 +630,20 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements IgniteDiscovery
     /**
      * Sets local host IP address that discovery SPI uses.
      * <p>
-     * If not provided, by default a first found non-loopback address
-     * will be used. If there is no non-loopback address available,
-     * then {@link InetAddress#getLocalHost()} will be used.
+     * If not provided, the value is resolved from {@link IgniteConfiguration#getLocalHost()}. If it is empty too, by
+     * default node binds to all available IP addresses. If there is no non-loopback address then
+     * {@link InetAddress#getLocalHost()} is used.
+     * <p>
+     * <b>NOTE:</b> You should assign node address through {@link IgniteConfiguration#setLocalHost(String)} or
+     * {@code setLocalAddress(String)}. Otherwise, several node addresses may be picked up and can prolong
+     * detection of node failure. Parameters like {@code failureDetectionTimeout} or {@code reconCnt} work per address
+     * sequentionally. Example: if node is binded to 3 ip addresses, previous node can take up to
+     * '{@code failureDetectionTimeout} * 3 + {@code connRecoveryTimeout}' to detect failure of malfunctional node and
+     * establish connection to other one.
      *
      * @param locAddr IP address.
      * @return {@code this} for chaining.
+     * @see IgniteConfiguration#setLocalHost(String).
      */
     @IgniteSpiConfiguration(optional = true)
     public TcpDiscoverySpi setLocalAddress(String locAddr) {
@@ -894,15 +902,6 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements IgniteDiscovery
      * <p>
      * If not provided {@link org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder} will
      * be used by default.
-     * <p>
-     * <b>NOTE:</b> You should assing multiple addresses to a node only if they represent some real physical connections
-     * which can give more reliability. Providing several addresses can prolong failure detection of current node.
-     * The timeouts and settings on network operations ({@link #failureDetectionTimeout()}, {@link #sockTimeout},
-     * {@link #ackTimeout}, {@link #maxAckTimeout}, {@link #reconCnt}) work per connection/address. The exception is
-     * {@link #connRecoveryTimeout}. And node addresses are sorted out sequentially.
-     * </p>
-     * Example: if you use {@code failureDetectionTimeout} and have set 3 ip addresses for this node, previous node in
-     * the ring can take up to 'failureDetectionTimeout * 3' to detect failure of current node.
      *
      * @param ipFinder IP finder.
      * @return {@code this} for chaining.