Skip to content

Commit

Permalink
Don't enable durable DData for RE unless DData is storage engine
Browse files Browse the repository at this point in the history
Partial fix for akkadotnet#7326
  • Loading branch information
Aaronontheweb committed Aug 23, 2024
1 parent 19162bd commit 0d33da1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>.Empty);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,6 @@ public static ClusterShardingSettings Create(Config config, Config singletonConf
throw ConfigurationException.NullOrEmptyConfig<ClusterShardingSettings>();


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"),
Expand Down Expand Up @@ -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);
}
}

/// <summary>
Expand Down

0 comments on commit 0d33da1

Please sign in to comment.