diff --git a/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingGuardian.cs b/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingGuardian.cs index 43a4deece14..6dc3047609a 100644 --- a/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingGuardian.cs +++ b/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingGuardian.cs @@ -303,8 +303,8 @@ internal static ReplicatorSettings GetReplicatorSettings(ClusterShardingSettings .WithFallback(Context.System.Settings.Config.GetConfig("akka.cluster.distributed-data")); var configuredSettings = ReplicatorSettings.Create(config); var settingsWithRoles = configuredSettings.WithRole(shardingSettings.Role); - if (shardingSettings.RememberEntities) - return settingsWithRoles; + if (shardingSettings.RememberEntities && shardingSettings.RememberEntitiesStore == RememberEntitiesStore.DData) + return settingsWithRoles; // only enable durable keys when using DData for remember-entities else return settingsWithRoles.WithDurableKeys(ImmutableHashSet.Empty); } diff --git a/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingSettings.cs b/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingSettings.cs index e8077e504ec..cad02e3a1cc 100644 --- a/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingSettings.cs +++ b/src/contrib/cluster/Akka.Cluster.Sharding/ClusterShardingSettings.cs @@ -366,14 +366,6 @@ public static ClusterShardingSettings Create(Config config, Config singletonConf throw ConfigurationException.NullOrEmptyConfig(); - int ConfigMajorityPlus(string p) - { - if (config.GetString(p)?.ToLowerInvariant() == "all") - return int.MaxValue; - else - return config.GetInt(p); - } - var tuningParameters = new TuningParameters( coordinatorFailureBackoff: config.GetTimeSpan("coordinator-failure-backoff"), retryInterval: config.GetTimeSpan("retry-interval"), @@ -426,6 +418,13 @@ int ConfigMajorityPlus(string p) tuningParameters: tuningParameters, coordinatorSingletonSettings: coordinatorSingletonSettings, leaseSettings: lease); + + int ConfigMajorityPlus(string p) + { + if (config.GetString(p)?.ToLowerInvariant() == "all") + return int.MaxValue; + return config.GetInt(p); + } } ///