From 59c1dcdceba69e27f3a2642498172ae07c1f489d Mon Sep 17 00:00:00 2001 From: Reuben Bond Date: Fri, 20 Oct 2023 12:37:20 -0700 Subject: [PATCH] Fix regression in CollectionAgeLimitAttribute --- .../Configuration/CollectionAgeLimitAttribute.cs | 8 ++++---- test/Grains/TestInternalGrains/EchoTaskGrain.cs | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs b/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs index 4f3b332c14..fc3a3cf763 100644 --- a/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs +++ b/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs @@ -35,22 +35,22 @@ public CollectionAgeLimitAttribute() { } /// /// Gets or sets the number of days to delay collecting an idle activation for. /// - public double Days { private get; init; } + public double Days { get; set; } /// /// Gets or sets the number of hours to delay collecting an idle activation for. /// - public double Hours { private get; init; } + public double Hours { get; set; } /// /// Gets or sets the number of minutes to delay collecting an idle activation for. /// - public double Minutes { private get; init; } + public double Minutes { get; set; } /// /// Gets or sets a value indicating whether this grain should never be collected by the idle activation collector. /// - public bool AlwaysActive { private get; init; } + public bool AlwaysActive { get; set; } /// /// Gets the idle activation collection age. diff --git a/test/Grains/TestInternalGrains/EchoTaskGrain.cs b/test/Grains/TestInternalGrains/EchoTaskGrain.cs index 81dec8deb9..6cbb866391 100644 --- a/test/Grains/TestInternalGrains/EchoTaskGrain.cs +++ b/test/Grains/TestInternalGrains/EchoTaskGrain.cs @@ -20,6 +20,7 @@ public class EchoTaskGrainState } [StorageProvider(ProviderName = "MemoryStore")] + [CollectionAgeLimit(Days = 1)] // Added to test the attribute itself. public class EchoGrain : Grain, IEchoGrain { private readonly ILogger logger; @@ -58,6 +59,7 @@ public Task EchoError(string data) } [StorageProvider(ProviderName = "MemoryStore")] + [CollectionAgeLimit("01:00:00")] // Added to test the attribute itself. internal class EchoTaskGrain : Grain, IEchoTaskGrain, IDebuggerHelperTestGrain { private readonly IInternalGrainFactory internalGrainFactory;