-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Akka.Cluster.Sharding: harden event-sourced RememberEntities
infrastructure against transient Akka.Persistence failures
#7401
Conversation
close akkadotnet#7399 - wrapped the RememberEntities coordinator and shard-store inside
RememberEntities
infrastructure against transient Akka.Persistence failures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed my changes
@@ -29,7 +30,15 @@ public EventSourcedRememberEntitiesProvider(string typeName, ClusterShardingSett | |||
/// <returns></returns> | |||
public Props ShardStoreProps(string shardId) | |||
{ | |||
return EventSourcedRememberEntitiesShardStore.Props(TypeName, shardId, Settings); | |||
var backoffOptions = Backoff.OnStop( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wraps the ShardStore
inside a BackoffSupervisor
- uses the same tuning parameters as the shard itself.
@@ -39,7 +48,14 @@ public Props ShardStoreProps(string shardId) | |||
/// <returns></returns> | |||
public Props CoordinatorStoreProps() | |||
{ | |||
return EventSourcedRememberEntitiesCoordinatorStore.Props(TypeName, Settings); | |||
var backoffOptions = Backoff.OnStop( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wraps the RememberEntitiesCoordinator
inside a BackoffSupervisor
- uses the same tuning parameters as the ShardingCoordinator
for backoff.
@@ -93,7 +93,7 @@ public RememberEntityStarter( | |||
Timers.StartPeriodicTimer("retry", ResendUnAcked.Instance, settings.TuningParameters.RetryInterval); | |||
} | |||
|
|||
public ITimerScheduler Timers { get; set; } | |||
public ITimerScheduler Timers { get; set; } = null!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed a nullability warning here. This value always gets set by the Akka.NET infrastructure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
resolved #7399
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):