Skip to content

No way to disable DData.Durable with Akka.Hosting #512

@Aaronontheweb

Description

@Aaronontheweb

I can validate that this DOES disable DData from writing to disk:

public static class DrawingSessionActorExtensions
{
    public static AkkaConfigurationBuilder AddDrawingSessionActor(this AkkaConfigurationBuilder builder,
        string clusterRoleName = ClusterConstants.DrawStateRoleName)
    {
        builder.WithShardRegion<DrawingSessionActor>("drawing-session",
                (system, registry, resolver) => s => resolver.Props<DrawingSessionActor>(s),
                new DrawingSessionActorMessageExtractor(), new ShardOptions()
                {
                    StateStoreMode = StateStoreMode.DData,
                    RememberEntities = true,
                    RememberEntitiesStore = RememberEntitiesStore.DData,
                    Role = clusterRoleName
                })
            // .WithDistributedData(options =>
            // {
            //     options.Durable = new DurableOptions() { Keys = [] }; // disable persistence
            // })
            .AddHocon("akka.cluster.sharding.distributed-data.durable.keys = []", HoconAddMode.Prepend);
        return builder;
    }
}

It looks like this is an Akka.Hosting issue with options.Durable = new DurableOptions() { Keys = [] }; // disable persistence not working as expected - and that's probably an easy fix.

Originally posted by @Aaronontheweb in akkadotnet/akka.net#7326 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions