Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E7A0D200D51 for ; Fri, 22 Dec 2017 11:12:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E6656160C19; Fri, 22 Dec 2017 10:12:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DAFE8160BFD for ; Fri, 22 Dec 2017 11:12:47 +0100 (CET) Received: (qmail 84995 invoked by uid 500); 22 Dec 2017 10:12:47 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 84986 invoked by uid 99); 22 Dec 2017 10:12:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Dec 2017 10:12:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 389E4DFF4D; Fri, 22 Dec 2017 10:12:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ptupitsyn@apache.org To: commits@ignite.apache.org Message-Id: <895433317a39491dbb02da7d2ab050b9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: IGNITE-6715 .NET: DataStorageConfiguration.WalAutoArchiveAfterInactivity Date: Fri, 22 Dec 2017 10:12:44 +0000 (UTC) archived-at: Fri, 22 Dec 2017 10:12:49 -0000 Repository: ignite Updated Branches: refs/heads/master 51e175b8a -> 0e8224f9c IGNITE-6715 .NET: DataStorageConfiguration.WalAutoArchiveAfterInactivity Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0e8224f9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0e8224f9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0e8224f9 Branch: refs/heads/master Commit: 0e8224f9c5ef06c1b1700379be3beb8996443558 Parents: 51e175b Author: Pavel Tupitsyn Authored: Fri Dec 22 13:12:36 2017 +0300 Committer: Pavel Tupitsyn Committed: Fri Dec 22 13:12:36 2017 +0300 ---------------------------------------------------------------------- .../platform/utils/PlatformConfigurationUtils.java | 4 +++- .../ApiParity/DataStorageConfigurationParityTest.cs | 9 +-------- .../Apache.Ignite.Core.Tests/Config/full-config.xml | 2 +- .../IgniteConfigurationSerializerTest.cs | 2 ++ .../IgniteConfigurationTest.cs | 3 +++ .../Configuration/DataStorageConfiguration.cs | 14 ++++++++++++++ .../Apache.Ignite.Core/IgniteConfigurationSection.xsd | 5 +++++ 7 files changed, 29 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/0e8224f9/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 0a278d1..49d8c18 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 @@ -1684,7 +1684,8 @@ public class PlatformConfigurationUtils { .setSystemRegionInitialSize(in.readLong()) .setSystemRegionMaxSize(in.readLong()) .setPageSize(in.readInt()) - .setConcurrencyLevel(in.readInt()); + .setConcurrencyLevel(in.readInt()) + .setWalAutoArchiveAfterInactivity(in.readLong()); int cnt = in.readInt(); @@ -1780,6 +1781,7 @@ public class PlatformConfigurationUtils { w.writeLong(cfg.getSystemRegionMaxSize()); w.writeInt(cfg.getPageSize()); w.writeInt(cfg.getConcurrencyLevel()); + w.writeLong(cfg.getWalAutoArchiveAfterInactivity()); if (cfg.getDataRegionConfigurations() != null) { w.writeInt(cfg.getDataRegionConfigurations().length); http://git-wip-us.apache.org/repos/asf/ignite/blob/0e8224f9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs index db53e2e..10cba72 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs @@ -31,12 +31,6 @@ namespace Apache.Ignite.Core.Tests.ApiParity "FileIOFactory" }; - /** Properties that are missing on .NET side. */ - private static readonly string[] MissingProperties = - { - "WalAutoArchiveAfterInactivity" - }; - /// /// Tests the ignite configuration parity. /// @@ -46,8 +40,7 @@ namespace Apache.Ignite.Core.Tests.ApiParity ParityTest.CheckConfigurationParity( @"modules\core\src\main\java\org\apache\ignite\configuration\DataStorageConfiguration.java", typeof(DataStorageConfiguration), - UnneededProperties, - MissingProperties); + UnneededProperties); } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/0e8224f9/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 24f519e..1fc42ad 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 @@ -143,7 +143,7 @@ walThreadLocalBufferSize="11" walArchivePath="abc" walFlushFrequency="00:00:12" walFsyncDelayNanos="13" walHistorySize="14" walMode="Background" walRecordIteratorBufferSize="15" walSegments="16" walSegmentSize="17" - walPath="wal-store" writeThrottlingEnabled="true"> + walPath="wal-store" writeThrottlingEnabled="true" walAutoArchiveAfterInactivity="00:00:18"> @@ -785,6 +787,7 @@ namespace Apache.Ignite.Core.Tests SystemRegionMaxSize = 128 * 1024 * 1024, ConcurrencyLevel = 1, PageSize = 8 * 1024, + WalAutoArchiveAfterInactivity = TimeSpan.FromMinutes(5), DefaultDataRegionConfiguration = new DataRegionConfiguration { Name = "reg1", http://git-wip-us.apache.org/repos/asf/ignite/blob/0e8224f9/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 ae3c0ed..e1be111 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/DataStorageConfiguration.cs @@ -104,6 +104,11 @@ namespace Apache.Ignite.Core.Configuration public const int DefaultMetricsSubIntervalCount = 5; /// + /// Default value for . + /// + public static readonly TimeSpan DefaultWalAutoArchiveAfterInactivity = TimeSpan.FromMilliseconds(-1); + + /// /// The default rate time interval. /// public static readonly TimeSpan DefaultMetricsRateTimeInterval = TimeSpan.FromSeconds(60); @@ -183,6 +188,7 @@ namespace Apache.Ignite.Core.Configuration SystemRegionInitialSize = DefaultSystemRegionInitialSize; SystemRegionMaxSize = DefaultSystemRegionMaxSize; PageSize = DefaultPageSize; + WalAutoArchiveAfterInactivity = DefaultWalAutoArchiveAfterInactivity; } /// @@ -219,6 +225,7 @@ namespace Apache.Ignite.Core.Configuration SystemRegionMaxSize = reader.ReadLong(); PageSize = reader.ReadInt(); ConcurrencyLevel = reader.ReadInt(); + WalAutoArchiveAfterInactivity = reader.ReadLongAsTimespan(); var count = reader.ReadInt(); @@ -269,6 +276,7 @@ namespace Apache.Ignite.Core.Configuration writer.WriteLong(SystemRegionMaxSize); writer.WriteInt(PageSize); writer.WriteInt(ConcurrencyLevel); + writer.WriteTimeSpanAsLong(WalAutoArchiveAfterInactivity); if (DataRegionConfigurations != null) { @@ -460,6 +468,12 @@ namespace Apache.Ignite.Core.Configuration public int ConcurrencyLevel { get; set; } /// + /// Gets or sets the inactivity time after which to run WAL segment auto archiving. + /// + [DefaultValue(typeof(TimeSpan), "-00:00:00.001")] + public TimeSpan WalAutoArchiveAfterInactivity { get; set; } + + /// /// Gets or sets the data region configurations. /// [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] http://git-wip-us.apache.org/repos/asf/ignite/blob/0e8224f9/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 c6eb3c1..5d76cde 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd +++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd @@ -1831,6 +1831,11 @@ Number of concurrent segments in Ignite internal page mapping tables. + + + Inactivity time after which to run WAL segment auto archiving. + +