Repository: ignite Updated Branches: refs/heads/ignite-6748 dd03b1462 -> 9c0b0f07f
.NET: Move CheckpointPageBufferSize to DataRegionConfiguration Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9c0b0f07 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9c0b0f07 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9c0b0f07 Branch: refs/heads/ignite-6748 Commit: 9c0b0f07f0d0f4bc9afc793ee580c87b4abfa7d1 Parents: dd03b14 Author: Pavel Tupitsyn <[email protected]> Authored: Wed Oct 25 13:04:32 2017 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Wed Oct 25 13:04:32 2017 +0300 ---------------------------------------------------------------------- .../platform/utils/PlatformConfigurationUtils.java | 4 +++- .../Apache.Ignite.Core.Tests/Config/full-config.xml | 6 +++--- .../IgniteConfigurationSerializerTest.cs | 6 +++--- .../IgniteConfigurationTest.cs | 6 +++--- .../Configuration/DataRegionConfiguration.cs | 8 ++++++++ .../Configuration/DataStorageConfiguration.cs | 9 --------- .../IgniteConfigurationSection.xsd | 15 ++++++++++----- 7 files changed, 30 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/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 b717650..5beb50c 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 @@ -1806,6 +1806,7 @@ public class PlatformConfigurationUtils { w.writeBoolean(cfg.isMetricsEnabled()); w.writeInt(cfg.getMetricsSubIntervalCount()); w.writeLong(cfg.getMetricsRateTimeInterval()); + w.writeLong(cfg.getCheckpointPageBufferSize()); } /** @@ -1827,7 +1828,8 @@ public class PlatformConfigurationUtils { .setEmptyPagesPoolSize(r.readInt()) .setMetricsEnabled(r.readBoolean()) .setMetricsSubIntervalCount(r.readInt()) - .setMetricsRateTimeInterval(r.readLong()); + .setMetricsRateTimeInterval(r.readLong()) + .setCheckpointPageBufferSize(r.readLong()); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml index 7ad5d48..2825841 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml @@ -134,7 +134,7 @@ <listener type='Apache.Ignite.Core.Tests.IgniteConfigurationSerializerTest+MyEventListener' /> </localEventListener> </localEventListeners> - <dataStorageConfiguration alwaysWriteFullPages="false" checkpointFrequency="00:00:01" checkpointPageBufferSize="2" + <dataStorageConfiguration alwaysWriteFullPages="false" checkpointFrequency="00:00:01" checkpointThreads="3" concurrencyLevel="4" lockWaitTime="00:00:05" metricsEnabled="true" pageSize="6" storagePath="cde" metricsRateTimeInterval="00:00:07" metricsSubIntervalCount="8" systemRegionInitialSize="9" systemRegionMaxSize="10" @@ -145,11 +145,11 @@ <dataRegionConfigurations> <dataRegionConfiguration emptyPagesPoolSize="1" evictionThreshold="2" initialSize="3" metricsEnabled="true" maxSize="4" name="reg2" pageEvictionMode="RandomLru" metricsRateTimeInterval="00:00:01" - metricsSubIntervalCount="5" swapPath="swap" /> + metricsSubIntervalCount="5" swapPath="swap" checkpointPageBufferSize="7" /> </dataRegionConfigurations> <defaultDataRegionConfiguration emptyPagesPoolSize="2" evictionThreshold="3" initialSize="4" maxSize="5" metricsEnabled="false" name="reg1" pageEvictionMode="Disabled" metricsRateTimeInterval="00:00:03" metricsSubIntervalCount="6" - swapPath="swap2" /> + swapPath="swap2" checkpointPageBufferSize="8" /> </dataStorageConfiguration> </igniteConfiguration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/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 4be34c7..b6897cc 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs @@ -278,7 +278,6 @@ namespace Apache.Ignite.Core.Tests var ds = cfg.DataStorageConfiguration; Assert.IsFalse(ds.AlwaysWriteFullPages); Assert.AreEqual(TimeSpan.FromSeconds(1), ds.CheckpointFrequency); - Assert.AreEqual(2, ds.CheckpointPageBufferSize); Assert.AreEqual(3, ds.CheckpointThreads); Assert.AreEqual(4, ds.ConcurrencyLevel); Assert.AreEqual(TimeSpan.FromSeconds(5), ds.LockWaitTime); @@ -312,6 +311,7 @@ namespace Apache.Ignite.Core.Tests Assert.AreEqual(5, dr.MetricsSubIntervalCount); Assert.AreEqual("swap", dr.SwapPath); Assert.IsTrue(dr.MetricsEnabled); + Assert.AreEqual(7, dr.CheckpointPageBufferSize); dr = ds.DefaultDataRegionConfiguration; Assert.AreEqual(2, dr.EmptyPagesPoolSize); @@ -910,7 +910,6 @@ namespace Apache.Ignite.Core.Tests { AlwaysWriteFullPages = true, CheckpointFrequency = TimeSpan.FromSeconds(25), - CheckpointPageBufferSize = 28 * 1024 * 1024, CheckpointThreads = 2, LockWaitTime = TimeSpan.FromSeconds(5), StoragePath = Path.GetTempPath(), @@ -945,7 +944,8 @@ namespace Apache.Ignite.Core.Tests PersistenceEnabled = false, MetricsRateTimeInterval = TimeSpan.FromMinutes(2), MetricsSubIntervalCount = 6, - SwapPath = Path.GetTempPath() + SwapPath = Path.GetTempPath(), + CheckpointPageBufferSize = 7 }, DataRegionConfigurations = new[] { http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/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 c8c06b2..f68371a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs @@ -543,7 +543,6 @@ namespace Apache.Ignite.Core.Tests Assert.AreEqual(DataStorageConfiguration.DefaultTlbSize, cfg.WalThreadLocalBufferSize); Assert.AreEqual(DataStorageConfiguration.DefaultCheckpointFrequency, cfg.CheckpointFrequency); Assert.AreEqual(DataStorageConfiguration.DefaultCheckpointThreads, cfg.CheckpointThreads); - Assert.AreEqual(default(long), cfg.CheckpointPageBufferSize); Assert.AreEqual(DataStorageConfiguration.DefaultLockWaitTime, cfg.LockWaitTime); Assert.AreEqual(DataStorageConfiguration.DefaultWalFlushFrequency, cfg.WalFlushFrequency); Assert.AreEqual(DataStorageConfiguration.DefaultWalFsyncDelayNanos, cfg.WalFsyncDelayNanos); @@ -580,6 +579,7 @@ namespace Apache.Ignite.Core.Tests Assert.AreEqual(DataRegionConfiguration.DefaultPersistenceEnabled, cfg.PersistenceEnabled); Assert.AreEqual(DataRegionConfiguration.DefaultMetricsRateTimeInterval, cfg.MetricsRateTimeInterval); Assert.AreEqual(DataRegionConfiguration.DefaultMetricsSubIntervalCount, cfg.MetricsSubIntervalCount); + Assert.AreEqual(default(long), cfg.CheckpointPageBufferSize); } /// <summary> @@ -769,7 +769,6 @@ namespace Apache.Ignite.Core.Tests { AlwaysWriteFullPages = true, CheckpointFrequency = TimeSpan.FromSeconds(25), - CheckpointPageBufferSize = 28 * 1024 * 1024, CheckpointThreads = 2, LockWaitTime = TimeSpan.FromSeconds(5), StoragePath = Path.GetTempPath(), @@ -804,7 +803,8 @@ namespace Apache.Ignite.Core.Tests PersistenceEnabled = false, MetricsRateTimeInterval = TimeSpan.FromMinutes(2), MetricsSubIntervalCount = 6, - SwapPath = IgniteUtils.GetTempDirectoryName() + SwapPath = IgniteUtils.GetTempDirectoryName(), + CheckpointPageBufferSize = 28 * 1024 * 1024 }, DataRegionConfigurations = new[] { http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataRegionConfiguration.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataRegionConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataRegionConfiguration.cs index 5c4240e..d20ce49 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataRegionConfiguration.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataRegionConfiguration.cs @@ -104,6 +104,7 @@ namespace Apache.Ignite.Core.Configuration MetricsEnabled = reader.ReadBoolean(); MetricsSubIntervalCount = reader.ReadInt(); MetricsRateTimeInterval = reader.ReadLongAsTimespan(); + CheckpointPageBufferSize = reader.ReadLong(); } /// <summary> @@ -122,6 +123,7 @@ namespace Apache.Ignite.Core.Configuration writer.WriteBoolean(MetricsEnabled); writer.WriteInt(MetricsSubIntervalCount); writer.WriteTimeSpanAsLong(MetricsRateTimeInterval); + writer.WriteLong(CheckpointPageBufferSize); } /// <summary> @@ -209,5 +211,11 @@ namespace Apache.Ignite.Core.Configuration Justification = "Consistency with Java config")] public int MetricsSubIntervalCount { get; set; } + /// <summary> + /// Gets or sets the size of the checkpointing page buffer. + /// <para /> + /// Default is <c>0</c>: Ignite will choose buffer size automatically. + /// </summary> + public long CheckpointPageBufferSize { get; set; } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs index 17b4ada..09b3fe4 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs @@ -189,7 +189,6 @@ namespace Apache.Ignite.Core.Configuration StoragePath = reader.ReadString(); CheckpointFrequency = reader.ReadLongAsTimespan(); - CheckpointPageBufferSize = reader.ReadLong(); CheckpointThreads = reader.ReadInt(); LockWaitTime = reader.ReadLongAsTimespan(); WalHistorySize = reader.ReadInt(); @@ -239,7 +238,6 @@ namespace Apache.Ignite.Core.Configuration writer.WriteString(StoragePath); writer.WriteTimeSpanAsLong(CheckpointFrequency); - writer.WriteLong(CheckpointPageBufferSize); writer.WriteInt(CheckpointThreads); writer.WriteTimeSpanAsLong(LockWaitTime); writer.WriteInt(WalHistorySize); @@ -308,13 +306,6 @@ namespace Apache.Ignite.Core.Configuration public TimeSpan CheckpointFrequency { get; set; } /// <summary> - /// Gets or sets the size of the checkpointing page buffer. - /// <para /> - /// Default is <c>0</c>: Ignite will choose buffer size automatically. - /// </summary> - public long CheckpointPageBufferSize { get; set; } - - /// <summary> /// Gets or sets the number of threads for checkpointing. /// </summary> [DefaultValue(DefaultCheckpointThreads)] http://git-wip-us.apache.org/repos/asf/ignite/blob/9c0b0f07/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 82eb465..74750e1 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd +++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd @@ -1582,6 +1582,11 @@ <xs:documentation>Enable disk persistence for this region.</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="checkpointPageBufferSize" type="xs:long"> + <xs:annotation> + <xs:documentation>Size of the checkpointing page buffer.</xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> <xs:element name="dataRegionConfigurations"> @@ -1650,6 +1655,11 @@ <xs:documentation>Enable disk persistence for this region.</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="checkpointPageBufferSize" type="xs:long"> + <xs:annotation> + <xs:documentation>Size of the checkpointing page buffer.</xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> @@ -1666,11 +1676,6 @@ <xs:documentation>Checkpointing frequency which is a minimal interval when the dirty pages will be written to the Persistent Store.</xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute name="checkpointPageBufferSize" type="xs:long"> - <xs:annotation> - <xs:documentation>Size of the checkpointing page buffer.</xs:documentation> - </xs:annotation> - </xs:attribute> <xs:attribute name="checkpointThreads" type="xs:int"> <xs:annotation> <xs:documentation>Number of threads for checkpointing.</xs:documentation>
