Skip to content

Akka.Cluster.Sharding: harden event-sourced RememberEntities infrastructure against transient Akka.Persistence failures#7401

Merged
Arkatufus merged 3 commits into
akkadotnet:devfrom
Aaronontheweb:reproduce-7399
Dec 2, 2024
Merged

Akka.Cluster.Sharding: harden event-sourced RememberEntities infrastructure against transient Akka.Persistence failures#7401
Arkatufus merged 3 commits into
akkadotnet:devfrom
Aaronontheweb:reproduce-7399

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Member

@Aaronontheweb Aaronontheweb commented Dec 2, 2024

Changes

resolved #7399

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

close akkadotnet#7399 - wrapped the RememberEntities coordinator and shard-store inside
@Aaronontheweb Aaronontheweb changed the title [WIP] Added reproduction for #7399 Akka.Cluster.Sharding: harden event-sourced RememberEntities infrastructure against transient Akka.Persistence failures Dec 2, 2024
Copy link
Copy Markdown
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed my changes

public Props ShardStoreProps(string shardId)
{
return EventSourcedRememberEntitiesShardStore.Props(TypeName, shardId, Settings);
var backoffOptions = Backoff.OnStop(
Copy link
Copy Markdown
Member Author

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.

public Props CoordinatorStoreProps()
{
return EventSourcedRememberEntitiesCoordinatorStore.Props(TypeName, Settings);
var backoffOptions = Backoff.OnStop(
Copy link
Copy Markdown
Member Author

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.

}

public ITimerScheduler Timers { get; set; }
public ITimerScheduler Timers { get; set; } = null!;
Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Akka.Cluster.Sharding: if remember-entities is enabled, shard won't start for initial persistence transient failures

2 participants