ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptupit...@apache.org
Subject ignite git commit: IGNITE-4799 Fix broken .NET merge
Date Wed, 26 Apr 2017 16:18:35 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2.0 746f8ebc2 -> 96f5cf5af


IGNITE-4799 Fix broken .NET merge


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

Branch: refs/heads/ignite-2.0
Commit: 96f5cf5af4d00c142c901ffd64379cb569fa87e1
Parents: 746f8eb
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Wed Apr 26 19:13:30 2017 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Wed Apr 26 19:18:28 2017 +0300

----------------------------------------------------------------------
 .../utils/PlatformConfigurationUtils.java       |  9 ++++---
 .../IgniteConfigurationSerializerTest.cs        |  3 +--
 .../IgniteConfigurationTest.cs                  |  8 +++---
 .../Discovery/Tcp/TcpDiscoverySpi.cs            | 28 --------------------
 .../Apache.Ignite.Core/IgniteConfiguration.cs   | 21 +++++++++++++++
 .../IgniteConfigurationSection.xsd              | 17 +++++-------
 6 files changed, 38 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/96f5cf5a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 9bbf5d6..6de5db8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -560,10 +560,10 @@ public class PlatformConfigurationUtils {
             cfg.setDaemon(in.readBoolean());
         if (in.readBoolean())
             cfg.setLateAffinityAssignment(in.readBoolean());
-        if (in.readBoolean()) {
-            cfg.setClientFailureDetectionTimeout(in.readLong());
+        if (in.readBoolean())
             cfg.setFailureDetectionTimeout(in.readLong());
-        }
+        if (in.readBoolean())
+            cfg.setClientFailureDetectionTimeout(in.readLong());
 
         readCacheConfigurations(in, cfg);
         readDiscoveryConfiguration(in, cfg);
@@ -977,8 +977,9 @@ public class PlatformConfigurationUtils {
         w.writeBoolean(true);
         w.writeBoolean(cfg.isLateAffinityAssignment());
         w.writeBoolean(true);
-        w.writeLong(cfg.getClientFailureDetectionTimeout());
         w.writeLong(cfg.getFailureDetectionTimeout());
+        w.writeBoolean(true);
+        w.writeLong(cfg.getClientFailureDetectionTimeout());
 
         CacheConfiguration[] cacheCfg = cfg.getCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/96f5cf5a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 2600028..538153c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -732,8 +732,6 @@ namespace Apache.Ignite.Core.Tests
                     LocalAddress = "127.0.0.1",
                     LocalPort = 49900,
                     LocalPortRange = 13,
-                    MaxMissedClientHeartbeats = 9,
-                    MaxMissedHeartbeats = 7,
                     ReconnectCount = 11,
                     StatisticsPrintFrequency = TimeSpan.FromSeconds(20),
                     ThreadPriority = 6,
@@ -795,6 +793,7 @@ namespace Apache.Ignite.Core.Tests
                 SpringConfigUrl = "test",
                 Logger = new IgniteNLogLogger(),
                 FailureDetectionTimeout = TimeSpan.FromMinutes(2),
+                ClientFailureDetectionTimeout = TimeSpan.FromMinutes(3),
                 PluginConfigurations = new[] {new TestIgnitePluginConfiguration() },
                 EventStorageSpi = new MemoryEventStorageSpi
                 {

http://git-wip-us.apache.org/repos/asf/ignite/blob/96f5cf5a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index b0ed0d2..5f4a8ca 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -107,8 +107,6 @@ namespace Apache.Ignite.Core.Tests
                 Assert.AreEqual(disco.LocalAddress, resDisco.LocalAddress);
                 Assert.AreEqual(disco.LocalPort, resDisco.LocalPort);
                 Assert.AreEqual(disco.LocalPortRange, resDisco.LocalPortRange);
-                Assert.AreEqual(disco.MaxMissedClientHeartbeats, resDisco.MaxMissedClientHeartbeats);
-                Assert.AreEqual(disco.MaxMissedHeartbeats, resDisco.MaxMissedHeartbeats);
                 Assert.AreEqual(disco.ReconnectCount, resDisco.ReconnectCount);
                 Assert.AreEqual(disco.StatisticsPrintFrequency, resDisco.StatisticsPrintFrequency);
                 Assert.AreEqual(disco.ThreadPriority, resDisco.ThreadPriority);
@@ -173,6 +171,7 @@ namespace Apache.Ignite.Core.Tests
                 Assert.AreEqual(com.UnacknowledgedMessagesBufferSize, resCom.UnacknowledgedMessagesBufferSize);
 
                 Assert.AreEqual(cfg.FailureDetectionTimeout, resCfg.FailureDetectionTimeout);
+                Assert.AreEqual(cfg.ClientFailureDetectionTimeout, resCfg.ClientFailureDetectionTimeout);
 
                 var binCfg = cfg.BinaryConfiguration;
                 Assert.IsFalse(binCfg.CompactFooter);
@@ -435,6 +434,8 @@ namespace Apache.Ignite.Core.Tests
             Assert.AreEqual(IgniteConfiguration.DefaultNetworkSendRetryCount, cfg.NetworkSendRetryCount);
             Assert.AreEqual(IgniteConfiguration.DefaultNetworkSendRetryDelay, cfg.NetworkSendRetryDelay);
             Assert.AreEqual(IgniteConfiguration.DefaultFailureDetectionTimeout, cfg.FailureDetectionTimeout);
+            Assert.AreEqual(IgniteConfiguration.DefaultClientFailureDetectionTimeout,
+                cfg.ClientFailureDetectionTimeout);
         }
 
         /// <summary>
@@ -484,8 +485,6 @@ namespace Apache.Ignite.Core.Tests
                     LocalAddress = "127.0.0.1",
                     LocalPort = 49900,
                     LocalPortRange = 13,
-                    MaxMissedClientHeartbeats = 9,
-                    MaxMissedHeartbeats = 7,
                     ReconnectCount = 11,
                     StatisticsPrintFrequency = TimeSpan.FromSeconds(20),
                     ThreadPriority = 6,
@@ -542,6 +541,7 @@ namespace Apache.Ignite.Core.Tests
                     UnacknowledgedMessagesBufferSize = 3450
                 },
                 FailureDetectionTimeout = TimeSpan.FromSeconds(3.5),
+                ClientFailureDetectionTimeout = TimeSpan.FromMinutes(12.3),
                 BinaryConfiguration = new BinaryConfiguration
                 {
                     CompactFooter = false,

http://git-wip-us.apache.org/repos/asf/ignite/blob/96f5cf5a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
index bdf5780..154124a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
@@ -68,16 +68,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
         public const int DefaultLocalPortRange = 100;
 
         /// <summary>
-        /// Default value for the <see cref="MaxMissedHeartbeats"/> property.
-        /// </summary>
-        public const int DefaultMaxMissedHeartbeats = 1;
-
-        /// <summary>
-        /// Default value for the <see cref="MaxMissedClientHeartbeats"/> property.
-        /// </summary>
-        public const int DefaultMaxMissedClientHeartbeats = 5;
-
-        /// <summary>
         /// Default value for the <see cref="IpFinderCleanFrequency"/> property.
         /// </summary>
         public static readonly TimeSpan DefaultIpFinderCleanFrequency = TimeSpan.FromSeconds(60);
@@ -105,8 +95,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
             ReconnectCount = DefaultReconnectCount;
             LocalPort = DefaultLocalPort;
             LocalPortRange = DefaultLocalPortRange;
-            MaxMissedHeartbeats = DefaultMaxMissedHeartbeats;
-            MaxMissedClientHeartbeats = DefaultMaxMissedClientHeartbeats;
             IpFinderCleanFrequency = DefaultIpFinderCleanFrequency;
             ThreadPriority = DefaultThreadPriority;
             TopologyHistorySize = DefaultTopologyHistorySize;
@@ -132,8 +120,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
             ReconnectCount = reader.ReadInt();
             LocalPort = reader.ReadInt();
             LocalPortRange = reader.ReadInt();
-            MaxMissedHeartbeats = reader.ReadInt();
-            MaxMissedClientHeartbeats = reader.ReadInt();
             StatisticsPrintFrequency = reader.ReadLongAsTimespan();
             IpFinderCleanFrequency = reader.ReadLongAsTimespan();
             ThreadPriority = reader.ReadInt();
@@ -211,18 +197,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
         public int LocalPortRange { get; set; }
 
         /// <summary>
-        /// Gets or sets the maximum heartbeats count node can miss without initiating status
check.
-        /// </summary>
-        [DefaultValue(DefaultMaxMissedHeartbeats)]
-        public int MaxMissedHeartbeats { get; set; }
-
-        /// <summary>
-        /// Gets or sets the maximum heartbeats count node can miss without failing client
node.
-        /// </summary>
-        [DefaultValue(DefaultMaxMissedClientHeartbeats)]
-        public int MaxMissedClientHeartbeats { get; set; }
-
-        /// <summary>
         /// Gets or sets the statistics print frequency.
         /// <see cref="TimeSpan.Zero"/> for no statistics.
         /// </summary>
@@ -279,8 +253,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
             writer.WriteInt(ReconnectCount);
             writer.WriteInt(LocalPort);
             writer.WriteInt(LocalPortRange);
-            writer.WriteInt(MaxMissedHeartbeats);
-            writer.WriteInt(MaxMissedClientHeartbeats);
             writer.WriteLong((long) StatisticsPrintFrequency.TotalMilliseconds);
             writer.WriteLong((long) IpFinderCleanFrequency.TotalMilliseconds);
             writer.WriteInt(ThreadPriority);

http://git-wip-us.apache.org/repos/asf/ignite/blob/96f5cf5a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index 1f7a184..2a6f5f7 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -96,6 +96,11 @@ namespace Apache.Ignite.Core
         /// </summary>
         public static readonly TimeSpan DefaultFailureDetectionTimeout = TimeSpan.FromSeconds(10);
 
+        /// <summary>
+        /// Default failure detection timeout.
+        /// </summary>
+        public static readonly TimeSpan DefaultClientFailureDetectionTimeout = TimeSpan.FromSeconds(30);
+
         /** */
         private TimeSpan? _metricsExpireTime;
 
@@ -129,6 +134,9 @@ namespace Apache.Ignite.Core
         /** */
         private TimeSpan? _failureDetectionTimeout;
 
+        /** */
+        private TimeSpan? _clientFailureDetectionTimeout;
+
         /// <summary>
         /// Default network retry count.
         /// </summary>
@@ -210,6 +218,7 @@ namespace Apache.Ignite.Core
             writer.WriteBooleanNullable(_isDaemon);
             writer.WriteBooleanNullable(_isLateAffinityAssignment);
             writer.WriteTimeSpanAsLongNullable(_failureDetectionTimeout);
+            writer.WriteTimeSpanAsLongNullable(_clientFailureDetectionTimeout);
 
             // Cache config
             var caches = CacheConfiguration;
@@ -425,6 +434,7 @@ namespace Apache.Ignite.Core
             _isDaemon = r.ReadBooleanNullable();
             _isLateAffinityAssignment = r.ReadBooleanNullable();
             _failureDetectionTimeout = r.ReadTimeSpanNullable();
+            _clientFailureDetectionTimeout = r.ReadTimeSpanNullable();
 
             // Cache config
             var cacheCfgCount = r.ReadInt();
@@ -940,6 +950,17 @@ namespace Apache.Ignite.Core
         }
 
         /// <summary>
+        /// Gets or sets the failure detection timeout used by <see cref="TcpDiscoverySpi"/>
+        /// and <see cref="TcpCommunicationSpi"/> for client nodes.
+        /// </summary>
+        [DefaultValue(typeof(TimeSpan), "00:00:30")]
+        public TimeSpan ClientFailureDetectionTimeout
+        {
+            get { return _clientFailureDetectionTimeout ?? DefaultClientFailureDetectionTimeout;
}
+            set { _clientFailureDetectionTimeout = value; }
+        }
+
+        /// <summary>
         /// Gets or sets the configurations for plugins to be started.
         /// </summary>
         [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]

http://git-wip-us.apache.org/repos/asf/ignite/blob/96f5cf5a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 76c2068..8476f1f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -909,16 +909,6 @@
                                 </xs:documentation>
                             </xs:annotation>
                         </xs:attribute>
-                        <xs:attribute name="maxMissedClientHeartbeats" type="xs:int">
-                            <xs:annotation>
-                                <xs:documentation>Maximum heartbeats count node can
miss without failing client node.</xs:documentation>
-                            </xs:annotation>
-                        </xs:attribute>
-                        <xs:attribute name="maxMissedHeartbeats" type="xs:int">
-                            <xs:annotation>
-                                <xs:documentation>Maximum heartbeats count node can
miss without initiating status check.</xs:documentation>
-                            </xs:annotation>
-                        </xs:attribute>
                         <xs:attribute name="reconnectCount" type="xs:int">
                             <xs:annotation>
                                 <xs:documentation>Maximum number of reconnect attempts
used when establishing connection with remote nodes.</xs:documentation>
@@ -1409,6 +1399,13 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:attribute>
+            <xs:attribute name="clientFailureDetectionTimeout" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>
+                        Failure detection timeout used by discovery and communication subsystems
for client nodes.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
         </xs:complexType>
     </xs:element>
 </xs:schema>


Mime
View raw message