@chbatey thanks for the reply, unfortunately I still didnt managed to get the entity recovered after startup.
I tried with the following ddata config now:
akka.cluster {
sharding.state-store-mode = ddata
distributed-data {
durable.keys = ["*"] # not sure which key I need to configure here so I just used * here to get something working
durable.lmdb.dir = "/home/david/tmp/lmdb"
}
}
and I can see that there is a mdb file created in the configured directory. But I dont know howto inspect it.
I am expecting that my entity continues with its operation after startup but I cannot see any logs which indicate this. Here are my signal handlers of the entity.
receiveSignal {
case (State.WaitingForTicketFilesBeeingGenerated(orderId, tickets), RecoveryCompleted) =>
logger.debug("Saga recovery completed, continuing saga with requesting file generation")
fetchTicketInfoAndRequestFileGeneration(orderId, tickets)
case (_, RecoveryFailed(ex)) => logger.error("Saga recovery failed", ex)
case (_, signal) => logger.info(s"Signal $signal")
}
This is what I see from akka debug logs:
2020-06-29 13:50:19.086 [INFO ] LmdbDurableStore - Using durable data in LMDB directory [/home/david/tmp/lmdb]
2020-06-29 13:50:19.296 [INFO ] Cluster - Cluster Node [akka://ticket-application@127.0.0.1:34997] - Node [akka://ticket-application@127.0.0.1:34997] is JOINING itself (with roles [dc-default]) and forming new cluster
2020-06-29 13:50:19.298 [INFO ] Cluster - Cluster Node [akka://ticket-application@127.0.0.1:34997] - is the new leader among reachable nodes (more leaders may exist)
2020-06-29 13:50:19.317 [INFO ] Cluster - Cluster Node [akka://ticket-application@127.0.0.1:34997] - Leader is moving node [akka://ticket-application@127.0.0.1:34997] to [Up]
2020-06-29 13:50:19.464 [INFO ] TicketServiceConfig - Config loaded: TicketServiceConfig(AwsConfig(AwsS3Config(Some(http://127.0.0.1:4572),eu-central-1,AwsCredentialsConfig(AAAAARXFKRBPZBIIKUPA,*****),ew-tickets),AwsLambdaConfig(http://127.0.0.1:3100/ticket)))
2020-06-29 13:50:19.512 [DEBUG] LmdbDurableStore - Init of LMDB in directory [/home/david/tmp/lmdb] took [427 ms]
2020-06-29 13:50:19.610 [DEBUG] LmdbDurableStore - load all of [1] entries took [97 ms]
2020-06-29 13:50:19.613 [DEBUG] Replicator - Loading 1 entries from durable store took 537 ms, stashed 6
13:50:19.896 INFO eventworld.gateway.events.scanapp.EntryManagementServiceActor [{}] - Starting to consume from ticket status updates topic
2020-06-29 13:50:20.042 [INFO ] NewsletterServiceConfig - Config loaded: NewsletterServiceConfig(http://localhost:3000/newsletter/verify,*****,ewtest@eventworld.com,AwsConfig(AwsSesConfig(eu-west-1,AwsCredentialsConfig(AKIAUBCVZ55H3KD44P2C,*****))))
13:50:20.073 INFO play.api.Play [{}] - Application started (Dev) (no global state)
2020-06-29 13:50:20.252 [INFO ] ClusterSharding - Starting Shard Region [GenerateTicketFilesSaga]...
2020-06-29 13:50:20.322 [DEBUG] ShardRegion - Idle entities will not be passivated because 'rememberEntities' is enabled.
2020-06-29 13:50:20.325 [DEBUG] ShardRegion - GenerateTicketFilesSaga: Coordinator moved from [] to [akka://ticket-application@127.0.0.1:34997]
2020-06-29 13:50:20.354 [INFO ] ClusterSingletonManager - Singleton manager starting singleton actor [akka://ticket-application/system/sharding/GenerateTicketFilesSagaCoordinator/singleton]
2020-06-29 13:50:20.356 [DEBUG] TimerScheduler - Cancel timer [RegisterRetry] with generation [2]
2020-06-29 13:50:20.361 [INFO ] ClusterSingletonManager - ClusterSingletonManager state change [Start -> Oldest]
2020-06-29 13:50:20.371 [DEBUG] Replicator - Received Get for key [GenerateTicketFilesSagaCoordinatorState].
2020-06-29 13:50:20.372 [DEBUG] Replicator - Received Get for key [shard-GenerateTicketFilesSaga-all].
2020-06-29 13:50:20.379 [INFO ] DDataShardCoordinator - ShardCoordinator was moved to the active state State(Map())
2020-06-29 13:50:20.619 [DEBUG] DDataShardCoordinator - ShardRegion registered: [Actor[akka://ticket-application/system/sharding/GenerateTicketFilesSaga#-442245352]]
2020-06-29 13:50:20.620 [DEBUG] DDataShardCoordinator - Publishing new coordinator state [State(Map())]
2020-06-29 13:50:20.633 [DEBUG] Replicator - Received Update for key [GenerateTicketFilesSagaCoordinatorState].
2020-06-29 13:50:20.636 [DEBUG] DDataShardCoordinator - The coordinator state was successfully updated with ShardRegionRegistered(Actor[akka://ticket-application/system/sharding/GenerateTicketFilesSaga#-442245352])
2020-06-29 13:50:20.637 [DEBUG] TimerScheduler - Cancel timer [RegisterRetry] with generation [4]
2020-06-29 13:50:20.638 [DEBUG] DDataShardCoordinator - New coordinator state after [ShardRegionRegistered(Actor[akka://ticket-application/system/sharding/GenerateTicketFilesSaga#-442245352])]: [State(Map())]
After this I dont see any relevant logs anymore about the GenerateTicketFilesSaga
I think I am close to getting it working but now I dont know what else I can try…