SnapshotStore doesn't reply with SnapshotNotFound some times
xirc opened this issue · comments
Taichi Yamakawa commented
SnapshotStore
(or ShardSnapshotStore
) should reply with SnapshotNotFound
if it has no EntitySnapshot
and is saving an EntitySnapshot
. For example, when an entity (ReplicatedEntityBehavior
) is recovering, the entity waits for a response from ShardSnapshotStore
. If ShardSnapshotStore
replies with SnapshotNotFound
, the entity can continue its recovery. If ShardSnapshotStore
replies with nothing, the entity might get recovery timed out. This case might rarely happen because the entity might be already recovered when SnapshotStore
receives a SaveSnapshot
command.
Related code:
- https://github.com/lerna-stack/akka-entity-replication/blob/v2.1.0/src/main/scala/lerna/akka/entityreplication/typed/internal/behavior/Recovering.scala#L36-L83
- https://github.com/lerna-stack/akka-entity-replication/blob/v2.1.0/src/main/scala/lerna/akka/entityreplication/raft/snapshot/SnapshotStore.scala#L93-L96