ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/14] ignite git commit: IGNITE-6486 .NET: Update IsActiveOnStart documentation
Date Tue, 26 Sep 2017 09:43:11 GMT
IGNITE-6486 .NET: Update IsActiveOnStart documentation

This closes #2729


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

Branch: refs/heads/ignite-3478
Commit: 6f1ca419fab840b920d408336ced69abaa4147cf
Parents: 6aa94a9
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Mon Sep 25 13:05:32 2017 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Mon Sep 25 13:05:32 2017 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  6 +++
 .../Cache/PersistentStoreTest.cs                | 47 +++-----------------
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  3 ++
 3 files changed, 15 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6f1ca419/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 6e91b10..a79d436 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -2207,6 +2207,9 @@ public class IgniteConfiguration {
      * significantly speed up large topology startup time.
      * <p>
      * Default value is {@link #DFLT_ACTIVE_ON_START}.
+     * <p>
+     * This flag is ignored when {@link PersistentStoreConfiguration} is present:
+     * cluster is always inactive on start when Ignite Persistence is enabled.
      *
      * @return Active on start flag value.
      */
@@ -2217,6 +2220,9 @@ public class IgniteConfiguration {
     /**
      * Sets flag indicating whether the cluster will be active on start. This value should
be the same on all
      * nodes in the cluster.
+     * <p>
+     * This flag is ignored when {@link PersistentStoreConfiguration} is present:
+     * cluster is always inactive on start when Ignite Persistence is enabled.
      *
      * @param activeOnStart Active on start flag value.
      * @return {@code this} instance.

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f1ca419/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTest.cs
index d321639..a592859 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTest.cs
@@ -18,7 +18,6 @@
 namespace Apache.Ignite.Core.Tests.Cache
 {
     using System.IO;
-    using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.PersistentStore;
@@ -52,15 +51,14 @@ namespace Apache.Ignite.Core.Tests.Cache
         [Test]
         public void TestCacheDataSurvivesNodeRestart()
         {
-            var cfg = new IgniteConfiguration(GetTestConfiguration())
+            var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
             {
                 PersistentStoreConfiguration = new PersistentStoreConfiguration
                 {
                     PersistentStorePath = Path.Combine(_tempDir, "Store"),
                     WalStorePath = Path.Combine(_tempDir, "WalStore"),
                     WalArchivePath = Path.Combine(_tempDir, "WalArchive"),
-                    MetricsEnabled = true,
-                    CheckpointingPageBufferSize = 1024 * 1024  // TODO: Use default (IGNITE-5717)
+                    MetricsEnabled = true
                 }
             };
 
@@ -115,14 +113,12 @@ namespace Apache.Ignite.Core.Tests.Cache
         [Test]
         public void TestGridActivationWithPersistence()
         {
-            var cfg = new IgniteConfiguration(GetTestConfiguration())
+            var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
             {
-                PersistentStoreConfiguration = new PersistentStoreConfiguration
-                {
-                    CheckpointingPageBufferSize = 1024 * 1024  // TODO: Use default (IGNITE-5717)
-                }
+                PersistentStoreConfiguration = new PersistentStoreConfiguration()
             };
 
+            // Default config, inactive by default (IsActiveOnStart is ignored when persistence
is enabled).
             using (var ignite = Ignition.Start(cfg))
             {
                 CheckIsActive(ignite, false);
@@ -134,7 +130,7 @@ namespace Apache.Ignite.Core.Tests.Cache
                 CheckIsActive(ignite, false);
             }
         }
-        
+
         /// <summary>
         /// Tests the grid activation without persistence (active by default).
         /// </summary>
@@ -189,36 +185,5 @@ namespace Apache.Ignite.Core.Tests.Cache
                     ex.Message.Substring(0, 62));
             }
         }
-
-        /// <summary>
-        /// Gets the test configuration.
-        /// </summary>
-        private static IgniteConfiguration GetTestConfiguration()
-        {
-            return new IgniteConfiguration(TestUtils.GetTestConfiguration())
-            {
-                MemoryConfiguration = GetMemoryConfig()
-            };
-        }
-
-        /// <summary>
-        /// Gets the memory configuration with reduced MaxMemory to work around persistence
bug.
-        /// </summary>
-        private static MemoryConfiguration GetMemoryConfig()
-        {
-            // TODO: Remove this method and use default config (IGNITE-5717).
-            return new MemoryConfiguration
-            {
-                MemoryPolicies = new[]
-                {
-                    new MemoryPolicyConfiguration
-                    {
-                        Name = MemoryConfiguration.DefaultDefaultMemoryPolicyName,
-                        InitialSize = 512*1024*1024,
-                        MaxSize = 512*1024*1024
-                    }
-                }
-            };
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f1ca419/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 5ac2258..14cd375 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -1262,6 +1262,9 @@ namespace Apache.Ignite.Core
         /// <summary>
         /// Gets or sets a value indicating whether grid should be active on start.
         /// See also <see cref="IIgnite.IsActive"/> and <see cref="IIgnite.SetActive"/>.
+        /// <para />
+        /// This property is ignored when <see cref="PersistentStoreConfiguration"/>
is present:
+        /// cluster is always inactive on start when Ignite Persistence is enabled.
         /// </summary>
         [DefaultValue(DefaultIsActiveOnStart)]
         public bool IsActiveOnStart


Mime
View raw message