akkadotnet / Akka.Hosting

Akka.Hosting - standardized Akka.NET hosting without any HOCON configuration. Ties into Microsoft.Extensions.Configuration, Logging, Hosting, and DependencyInjection.
Apache License 2.0
56 stars 13 forks source link

Add the possibility to set the storage path of DData database in ShardOptions #431

Closed montigab78 closed 7 months ago

montigab78 commented 7 months ago

Hello, in my organization we use cluster sharding with DData storage. Let'say we have this configuration: configurationBuilder => { configurationBuilder.WithShardRegion("tenants", (system, registry, resolver) => { bla bla... }, new TenantMessageRouter(), new ShardOptions() { Role = TenantActorProps.ActorRole, RememberEntities = true, StateStoreMode = StateStoreMode.DData, RememberEntitiesStore = RememberEntitiesStore.DData, }); } When this is specified, a database named data.mdb gets created in my project_dir\ddata-projectname-webReplicator-9210 (in which 9210 is the port number). However, when this service is installed in production as windows service, the same folder is created in C:\Windows\System32 It would be useful to be able to configure the destination folder.

Thanks

Arkatufus commented 7 months ago

@montigab78 Sorry for taking so long to answer. We do actually have this option already, although it is kind of burried deep. The way you set the LMDB path is through ShardOptions.DistributedData.Durable.Lmdb.Directory.